Water Problem At Stair Landing

You wouldn't have this problem if the 2
x 6 creating the floor area of the landing went over the stair ledger.
This would be even better if the 2 x 6 extended over the ledger
about 1 inch creating a stair nosing. As you can see where the red arrow
pointing to a gap between the ledger and the landing.
This gap will fill
up with water when it rains and moisture when certain weather conditions
are relevant. The gap in this picture has rotted the ledger from the
back as well as the front creating more damage behind the ledger.