All roof penetrations need to be properly flashed to prevent water damage. This is especially important with dormers because they expose a large wall area to the weather and create many linear feet of vulnerable roof-wall intersections.
Here’s a step-by-step look at how to flash a dormer so that water is carried away from those vulnerable areas.
 Install roof underlayment up to the dormer, cutting it a few inches short of the roof-wall joints at the front and side walls. Apply peel-and-stick membrane to the front wall of the dormer, making sure it overlaps the roof underlayment and wraps up onto the wall 6 or 8 inches. Then do the same at the dormer sides, either stretching the membrane (or folding it, after making a small cut) around the corner.
 Install the rest of the roof underlayment, making sure to roll it up the side walls. Both the peel-and-stick membrane and the underlayment should extend up the wall higher than the vertical leg of the step flashing.
 Install roof shingles to the base of the dormer, notching around the corners as needed. Lay a bead of roofing cement along the shingles just below the dormer and bed the metal base flashing into it. Ideally, this custom flashing will have soldered corners, but if not, carefully notch the metal at the dormer corners and wrap the vertical leg around the corner onto the side wall. Fasten this flashing to the dormer walls, keeping the fasteners as far from the roof-wall joint as you can.
 The first piece of step flashing should extend over the base flashing. Carefully cut it at the bend and turn the vertical leg around the corner onto the front wall. Fasten only the roof leg, nailing through the flashing and the shingle into the roof sheathing. Fastening only the roof leg will avoid problems that may be caused by movement at the roof-wall joint.
 The next asphalt shingle overlaps the first piece of step flashing, completely concealing it. Install the next piece of step flashing on top of this shingle, aligning the bottom edge just above the nailing strip. Again, fasten only to the roof with a nail through the flashing and the shingle. Repeat—shingle, step flashing, shingle, step flashing—all the way up both sides of the dormer.
 At the top, roll the roof underlayment up onto the soffit and use peel-and-stick to seal the roof-soffit connection. Cover the membrane with a metal closure flashing. This area won’t get a lot of bulk water, but the flashing layers will keep windblown rain and snow from getting behind the roofing.
 Finally, install housewrap on the dormer wall, being careful to overlap the top of the step flashing and base flashing by several inches.