How to Build a Dog Fence

black dog in front of wooden fence

Catherine Falls Commercial / Getty Images

Project Overview
  • Working Time: 2 days, 1 hr - 3 days
  • Total Time: 3 - 4 days
  • Yield: Wood and wire dog fence
  • Skill Level: Intermediate
  • Estimated Cost: $1500 to 2500

While there's no doubt that dogs love to lounge around the house, they're built for the great outdoors. Well, most of them. If your dog loves to run around the yard, give your good boy (or girl) the gift of a DIY dog fence. Not only will they benefit from more exercise and time spent outside, but once you see how happy their newfound freedom makes them, you're going to wonder why you didn't do it sooner.

This DIY dog fence is constructed using wood and wire and is sure to keep your pup where you want her, no matter how hard she tries to escape. This fence design is a great DIY alternative to expensive wood privacy fences that make your yard feel closed in, and we've laid out exactly how to build the best wood and wire fence for you and your dog's needs. Plus, we've got a few tips for combatting determined diggers that find a way to tunnel under any fence.

What to Consider Before Building a Wood and Wire Fence

Before you get started, there are a few things you should determine to guarantee you're building the best fence for your dog's needs. Additionally, there are several aesthetic changes that can be made to match your fence to your vision.

Welded Wire vs. PVC Netting

This DIY dog fence will utilize wood for the posts and rails. This is where most of the fence's strength will come from, as the wire acts as a secondary barrier that closes the smaller gaps. For the wire, you can choose between welded wire or PVC netting. To help you decide, we've broken down each option with a pros and cons list.

Welded Wire

Pros
  • Strong metal construction

  • Aesthetically pleasing

  • Strong metal materials can't be chewed through

Cons
  • More expensive than PVC netting

  • Can eventually rust

  • Can bend, stretch, and lose shape

PVC Netting

Pros
  • Less expensive than welded wire

  • Last 10+ years

  • UV treated

Cons
  • Plastic is less visually appealing to some

  • Dogs can potentially chew through material

How to Keep Dogs From Digging Under a Fence

Even the strongest fence is no match for a dog that has figured out how to dig its way under the fence. Unfortunately, once a dog figures this out, it can be very difficult to stop them. Here are a few tips:

Store-bought barriers. Since the barrier created by your fence stops at the ground, you can purchase metal barriers that drive into the ground below your fence. While this is an effective solution, these products can be pricey, so they are better used as spot treatments.

Rock barrier. To keep your pesky pooch from digging under the fence, simply create a dig-proof barrier out of large rocks. To do this, simply remove some dirt just beneath the fence and replace it with large rocks. For very determined dogs, combining large rocks with a layer of gravel should do the trick.

Buried wire barrier. Just like above ground, PVC wire can be used underground. Start by digging a trench at the base of your fence (this is much easier done when installing the fence than after). Install netting attached to the bottom of your fence and pull it down to rest in the trench. Backfill the trench using dirt and gravel to create a nearly impenetrable barrier. Bonus: This is a great way to keep critters out of a garden!

When to Build a Fence

Refrain from starting your fence project during a season of consistent wet weather. Digging in the muddy ground will make an unnecessary mess and compromise the packing quality of the dirt that holds your fence posts. Always wait until the dirt dries before you set your posts.

Codes and Regulations

Before planning the layout of your fence, check your local building codes for regulations regarding fence style and height as well as placement in relation to property lines and easements. Additionally, if your neighborhood is part of an HOA (homeowners association), you'll need to check with them before proceeding. For additional information, check out the Fence Building Law Basics for Homeowners.

What You'll Need

Equipment / Tools

  • Circular saw
  • Auger or post hole digger
  • Hammer
  • Mason string
  • Tape measure
  • Drill
  • Drill bits
  • Post level
  • Wheelbarrow
  • Shovel
  • Post hole tamper

Materials

  • 6x6 x 8-foot ground contact boards (corner posts)
  • 4x4 x 8-foot ground contact boards (inner posts)
  • 2x4 x 10-foot pressure treated boards
  • Wood stakes
  • Scrap wood
  • 4-foot welded wire or PVC netting fence material
  • Galvanized staples
  • Marking paint
  • Gate hardware
  • 3-1/2-inch exterior wood screws
  • 2-1/2-inch exterior wood screws
  • Fast-setting concrete
  • 1/2-inch gravel
  • Exterior wood sealant and applicator

Instructions

How to Build a DIY Dog Fence

The following steps outline how to build a fence with wooden posts and rails. To fill the space between the rails, either welded wire or PVC netting can be used and both processes are included.

  1. Plan Corner Post Placement

    The first step to laying out your fence lines is to determine the placement of your corner posts. For a standard four-corner fence that attaches to your house, two corner posts will sit against your house at your chosen positions. The other two corner posts will sit away from your house. Mark each post's position with marking spray paint.

    Warning

    Before digging in your yard for this type of project, the law requires you to call 811 to have underground utilities in your yard located and marked.

  2. Drive Stakes and Run String

    To ensure your posts are squared, you'll need to run string lines. To do this, first, drive a stake at the post marks nearest your house.

    The corner posts sitting away from your house will need to be staked a couple of feet past where the post will actually sit, with two stakes positioned 90 degrees from one another. This will allow you to run mason string to the stakes which will aid in setting the posts square by hovering just above the hole and creating a 90-degree angle guide. Repeat this for each corner post, then tightly run your string.

  3. Set Corner Posts

    To set a corner post, use an auger or post hole digger to dig a 2-foot-deep hole. Place a 6-inch layer of gravel in the bottom of the hole then lower the post in and fasten a post level to the top. Attach two scrap-board support legs to the post positioned at 90 degrees.

    Maneuver the post until it's sitting against your 90-degree string guide. Once perfectly positioned and plumbed, drive a stake beside each support leg and, without moving the post, screw the support leg to the stake.

    Now that the post is secured in position, mix fast-setting concrete according to the manufacturer's instructions, then fill the hole. Repeat for the remaining corner posts.

  4. Run String Line

    Now that the corner posts are in place and the concrete is set, remove the support legs and stakes. Tightly run the mason string close to the ground stretching from post to post to establish your fence lines.

  5. Mark Remaining Posts

    Use marking spray paint to mark the remaining posts' placement. The rails will consist of 10-foot boards, so place the posts just under 10 feet apart to ensure the rails aren't too short to span the distance. If you plan to include a gate in your design, this is the time to layout the placement.

  6. Dig Post Holes

    Once you've marked every post's position on the ground, remove the mason string and dig each hole.

  7. Run New Mason String

    Run a mason string guideline once more from corner post to corner post.

  8. Set Posts

    Set each inner post against your string line. While it's not necessary for each inner post to be set in concrete, it's wise to set any post that will hold a gate with concrete. We chose to set our inner posts using a mixture of dirt and gravel, with a 6-inch layer of gravel at the bottom of the hole for drainage.

    Tamp each post in as you add the dirt and gravel mixture to ensure it is firmly packed, and check for plumb as you go.

  9. Cut Story Pole

    A story pole or story stick is a piece of wood cut to a specific length that you will use as a reference to mark the height of each post. If you're building a 4-foot fence, account for 3 inches beneath the wire and at least 3 inches above by cutting your story pole to 54 inches in length.

  10. Mark and Cut Posts

    Walk around the fence perimeter and mark each post using your story pole as a guide. Once marked, cut the excess off of each post using either a chainsaw or a circular saw.

  11. Attach Welded Wire or PVC Netting

    The process of mounting the welded wire to the fence isn't much different than the process used to mount the PVC netting, but any discrepancies will be noted.

    Begin by mounting the end of the material roll to the corner post nearest to the house, positioned on the outside of the post sitting 2-3 inches from the ground. Both materials can be mounted to the post using galvanized staples. You'll need one staple at the top, one at the bottom, and several equally spaced throughout the middle.

    Warning

    For both welded wire and PVC netting, it's important to refrain from overdriving the staples. You want them tight, but not tight enough to sever the material they're intended to hold.

  12. Unroll Fence Material to Next Corner Post

    While you may be tempted to mount the material to each post as you unroll it, it's much better to first mount it to the next corner post. Unroll the material until you reach the next post.

  13. Stretch and Mount Fence Material

    Stretch the material as much as possible before stapling it to the corner post. Once stapled, cut the mounted fence material from the roll, leaving enough to wrap around to the other side of the corner post. Staple the excess to the other side of the post.

    Tip

    Stretching PVC netting by hand can be fairly effective, but if you really want welded wire fence stretched tightly, you may need a fence stretcher. In this particular application, tightly hand stretching will do the trick, as the welded wire is simply a secondary barrier held in place by the wood posts and rails.

  14. Mount Next Row of Fence

    Starting at the corner post where you terminated the last row of fence material, begin the new row. Wrap it around the corner post as you did in the previous step, and secure it with staples. Pull the material to the next corner post, mount it, and cut it in the same manner as the previous post. Repeat the process on the remaining rows.

  15. Secure Fence Material to Inner Posts

    Use galvanized staples to secure the fence material to each inner post, adjusting the material to evenly follow the lay of the land as you go. At a minimum, place one staple at the bottom and top, as well as one near the center.

  16. Plan Horizontal Rail Layout

    The horizontal rails will sit on the outside of the fence, mounted over the top of the rolled fence material. The amount of horizontal rails is adjustable according to your preference and budget constraints, but at minimum, the fence will require one at the top, one at the bottom, and one in the center. If your fence is taller than 4 feet, opt for additional rails in between the top and bottom. Our 4-foot fence will feature four rails.

  17. Mount Horizontal Rails

    Between each set of posts, mount a top rail and a bottom rail with the edges of the rolled fence material centered on each board. Cut the rails so the ends sit in the middle of each post and screw them into place using two 3-1/2-inch exterior wood screws on each end. Mount your desired number of middle horizontal rails equally spaced from the bottom and top rails.

    Tip

    While you may be tempted to cut your rails ahead of time, it's better to measure and cut them as you go because the posts likely are not perfectly spaced.

  18. Seal the Fence

    Seal the fence using either a clear or tinted exterior wood sealant, following the manufacturer's instructions for proper application practices.

How to Build a Wood and Wire Gate

There are seemingly endless ways to build a gate for a fence. If you are planning to make your own rather than purchase a prefabricated gate, here is one of the quickest and easiest ways to build a beautiful gate that will last for years of use.

  1. Measure Gate Opening

    Measure the opening for your gate then subtract two inches from the width. This will be width of your gate while the height will be determined by the height between your top and bottom horizontal rails. So, for our 4-foot fence, our gate will be 4 feet tall.

    Cut 2x4 pressure treated boards into two 4-foot long vertical pieces and two horizontal pieces matching your predetermined width.

  2. Build Gate Frame

    There's no fancy joinery required to build this gate frame. Simply place the two vertical pieces side-by-side on your work surface and space them according to your gate's width. You can use the horizontal pieces as guides.

    Cut a piece of your rolled fence material to your gate's width minus 2 inches. Place the material on the vertical boards and staple it in place.

    Place the horizontal boards on top of the vertical pieces, adjust until the corners perfectly align, and screw them into place using 2-1/2-inch exterior wood screws.

  3. Add Cross Brace

    A classic diagonal cross brace will add plenty of structure and support to your gate as well as an aesthetically pleasing touch, and, while this may seem complicated, it's actually very simple.

    Simply lay a board on top of the gate frame from the top corner to the opposing bottom corner, then use a pencil to mark your cut lines. Cut the board to size, slide it in, and screw it in place.

  4. Mount the Gate

    To make the mounting process easy, place it on scrap wood to hold it in place height-wise, then shim the top to hold it in place side-to-side. Mount your gate hardware according to the manufacturer's instructions, then remove your shims.

  5. Seal the Gate

    Seal the gate just as you did the fence.

How to Maintain a Wood and Wire Fence

The most important thing you can do to ensure your wood fence lasts for years to come is to regularly seal the wood. Sun and rain do a number on wood fences and unsealed wood will quickly deteriorate and fail.