To attach a pergola to a house, remove the siding, fasten a ledger of at least 2×8 lumber to the rim joist with ½-inch lag screws or through-bolts, flash it, and hang the rafters off it, following the ledger rules in the American Wood Council’s DCA 6 deck guide. Two posts carry the outer edge.
The carpentry is straightforward. The part that decides whether it ages well or rots your wall is the flashing, and it is the step most guides skip in a sentence.
Key takeaways
- Bolts go into framing — DCA 6 has the lag screw tip pass fully beyond the inside face of the rim joist. Siding and sheathing hold nothing.
- Flashing is not optional. DCA 6 requires corrosion-resistant flashing at any ledger on a wood-framed wall; Z-flashing tucked under the siding and folded over the ledger sheds the water the ledger now catches.
- Two posts, not four — that’s the payoff: more usable patio, an integrated look.
- Brick, stucco, and roofs are the hard modes. Each has a correct method, and each punishes improvisation.
- Freestanding a few inches off the wall gets you most of the look with no holes in the wall, and DCA 6 bans deck ledgers on brick, stone or masonry veneer anyway.
Where to attach a pergola to a house — and how it carries load
The ledger detail here is the same one used for deck ledgers, and it is worth borrowing their homework: the American Wood Council’s DCA 6 deck construction guide, based on the 2015 IRC, devotes pages to ledger attachment and flashing because that connection is where water gets in.
Its tables assume deck loads of 40 psf live and 10 psf dead, so use it for the connection details and let your building department confirm the rest.
An attached pergola is half a structure: the house takes one long edge, two posts take the other. The load path on the house side runs rafter → ledger board → bolts → rim joist → foundation, and every one of those links must be real framing.
The classic mistake is bolting into siding and sheathing — materials designed to keep weather out, not to carry a beam full of snow in a gust of wind. DCA 6 has the siding removed before the ledger goes on and allows no more than ½ inch between the ledger face and the sheathing face.
The outer edge is ordinary post work: two posts on footings, or on a deck where the load reaches structure below — the same rules as putting a pergola on a deck.
Step 1: find the framing and set the height
- Locate the rim joist. The band of framing at floor level is the ideal anchor — it is continuous and deep. DCA 6 details assume a 2-inch nominal (1½-inch actual) lumber band joist or an LVL rim at least 1 inch thick; a stud-only attachment falls outside those details, so clear it with your building department.
- Set the ledger height so the beams clear at least 6 ft 8 in, the minimum clear height in Escondido, California’s patio cover standard (your city may differ), and so the rafters clear doors, windows, and any downspout.
- Snap a level line. A ledger that is off by a half inch over twelve feet shows in every rafter afterward.

Step 2: flashing — the step that decides everything
This is the step that separates a pergola from a future repair bill. On lap or vinyl siding:
- Cut back the siding to expose sheathing in a band slightly taller than the ledger — the ledger should sit against sheathing, not on top of siding.
- Install Z-flashing: its top leg slides up under the siding above, the middle sits behind the ledger’s top edge, and the bottom leg folds out over the ledger. Water travels down the wall, hits the flashing, and gets thrown outward instead of sitting on the ledger. DCA 6 calls for corrosion-resistant metal at least 0.019 inch thick and warns against aluminum touching copper-treated lumber.
- Seal the fastener penetrations and any cut edges of housewrap as you go — the flashing sheds bulk water, but every bolt hole is still a hole through your weather barrier.
- Never rely on caulk alone. On a wood-framed wall DCA 6 requires flashing at the ledger, not just a bead of sealant; caulk is a helper, flashing is geometry.

Step 3: bolt the ledger
- Use ½-inch lag screws or through-bolts, hot-dip galvanized or stainless, never deck screws. DCA 6 permits only the fasteners it lists and prohibits lead anchors; FastenMaster sells its LedgerLOK structural screw as a substitute for the IRC’s ½-inch lag.
- Stagger fasteners from top to bottom along the ledger, as DCA 6 requires; LedgerLOK installs in a V pattern.
- Follow a spacing table, not a guess. DCA 6 Table 5 spaces ½-inch lags into a 2x lumber rim from 30 inches on center for short deck joists down to 10 inches for 16- to 18-foot spans; FastenMaster asks for at least 2 inches from the edges and 3¾ inches from the ends for LedgerLOK.
- Washers on everything. DCA 6 requires them on lag screws and at both the head and nut of through-bolts, and has you drill a ½-inch hole in the ledger and a 5/16-inch pilot into the rim for each lag.
Wall type changes everything
| Wall | What to do | Difficulty |
|---|---|---|
| Lap / vinyl siding over wood framing | Standard ledger + Z-flashing into rim joist or studs | DIY-friendly |
| Brick veneer | Veneer isn’t structural — DCA 6 prohibits deck ledgers on or through brick, stone or masonry veneer; go freestanding or get an engineered detail | Hard |
| Stucco | Every penetration must be sealed into the drainage plane; easy to breach invisibly | Hard |
| Solid masonry / block | ½-inch expansion or adhesive anchors with washers into concrete or solid masonry, per DCA 6; hollow masonry is prohibited | Moderate–hard |
| Roof edge (no usable wall) | Roof-mount brackets into rafters, flashed at each penetration | Pro territory |
Mounting to the roof instead
When the wall below is brick, mostly glass, or simply too low, purpose-made roof-mount brackets reach through the roofing into rafters or added blocking and lift the pergola beam above the roof line. Some cities also allow rafters hung from the fascia; Escondido limits 2x lattice-cover rafters on a fascia to a 12-foot span.
Done right — blocking sized correctly, boot flashing sealed into the shingle courses — it is a clean solution. Done casually, you have punched holes in a roof, and the leak shows up on a ceiling months later. This is the point where hiring a roofer for the penetrations is cheap insurance.

When NOT to attach — and what to do instead
Plenty of good pergolas never touch the house. Go freestanding when:
- The wall is brick veneer or stucco and you are not hiring a pro.
- You rent, or the HOA restricts changes to the house envelope.
- The wall is full of windows, vents, or a gas meter where the ledger needs to run.
- Your area sees heavy snow or high wind and you would rather not tie that load into the wall.
The move: set a four-post pergola a few inches off the wall. From the patio it reads as attached, the gap lets the wall drain and dry, and you never cut into siding at all. It costs two extra posts and footings, and no hole in the wall.

Permits and the paperwork
Attaching to the house makes a pergola part of the building. Escondido, California, for one, treats an attached lattice patio cover as an alteration to the existing structure, and DCA 6 leaves alternative details to the authority having jurisdiction. Check the building department and the HOA before you buy lumber.
The same rules that govern attached versus freestanding structures generally decide whether you need a drawing, an inspection, or nothing at all. Once the paperwork is clear, the framing steps in how to build a pergola take over.
Mistakes that lead to wall repairs
- No flashing. Water reaching the rim joist is exactly what DCA 6’s ledger flashing rule exists to stop.
- Bolting through siding into sheathing. Feels solid on install day; isn’t.
- Ledger on top of siding. Traps water in the lap and prevents flashing from working.
- Anchoring to brick veneer as if it were structural. Veneer is a rain screen, not a beam seat, and DCA 6 prohibits deck ledgers on it.
- Caulk instead of geometry. Every caulk joint outdoors is on a countdown.
- Skipping the permit on an attached structure — discovered at resale, when it is most expensive.
Frequently asked questions
How do you attach a pergola to a house?
Remove the siding, then fasten a ledger of at least 2×8 lumber to the house rim joist with ½-inch lag screws or through-bolts with washers, staggered top to bottom, the details DCA 6 sets for deck ledgers. Add corrosion-resistant metal flashing tucked under the siding above. The rafters hang off that ledger, and posts carry the outer edge.
Do you need flashing behind a pergola ledger?
Yes. A ledger creates a horizontal ledge against the wall that catches water, and DCA 6 requires corrosion-resistant flashing at any ledger on a wood-framed wall. Z-flashing tucked up under the siding and folded over the ledger’s top edge sends that water back out. Skipping it is the classic path to a rotted rim joist.
Can you attach a pergola to a roof instead of a wall?
Yes, with purpose-made roof-mount brackets that reach through the roofing into rafters or blocking and are flashed at the penetration. It is the standard fix when the wall below is brick, stucco, or full of windows — but each penetration is a potential leak, so it is a good place to hire a pro.
Where do the ledger bolts go?
Into the house band or rim joist, never into siding or sheathing alone. DCA 6 calls for the lag screw tip to pass fully beyond the inside face of the rim, a ½-inch hole in the ledger and a 5/16-inch pilot into the band joist, and fasteners staggered from top to bottom along the ledger.
Is an attached pergola cheaper than freestanding?
Slightly — two posts instead of four, two fewer footings. But you add ledger hardware, flashing, and usually a permit review, so the saving is small. Choose attached for the integrated look and floor space, not to save money; the pergola cost breakdown shows where the budget actually goes.
Can I attach a pergola to a brick or stucco wall?
Brick veneer is not structural, and DCA 6 prohibits deck ledgers attached to or through brick, stone or masonry veneer, so treat a veneer wall as freestanding territory unless an engineer details it. Stucco can take a ledger only if every penetration is sealed into the drainage plane. Many builders simply set the pergola freestanding a few inches off the wall instead.
Sources
- American Wood Council, DCA 6: Prescriptive Residential Wood Deck Construction Guide (2015 IRC edition, 2018 printing). Checked October 15, 2026.
- FastenMaster, LedgerLOK flat head installation instructions. Checked October 15, 2026.
- City of Escondido, California, Building Permit Requirements for: Lattice Patio Cover (Guideline 8A). Checked October 15, 2026.



