How to Install an Electric Underground Fence for Pets

Save on installation costs by learning how to run your own "invisible" home fence for the containment and safety of your furry BFF.

Follow Emily on:

The decision to install underground wire fencing prior to adopting a new dog was an easy one. On a street with a lot of foot traffic and a backyard with plenty of wildlife, our main goal for the fence is to offer safety and security for our new pet. To buy and install your own hidden wire fence is reasonably affordable at around $300, depending on the length of wire you need to encompass your property. Alternatively, a professional installation could run you $2 per linear foot (or more). For our 850-foot loop, we did it ourselves in order to save $1,700. Side note: Did you know you can allegedly train cats using this method, too? I’m pretty sure that’s why they created the laughing cat emoji.

Training a puppy with an underground wire fence.

How to Install an Underground Wire Fence For Your Pet

Learn the DIY way to install an underground "invisible" fence around the edge of your yard.

Photo by: Emily Fazio

Emily Fazio

Materials and Tools:

  • measuring tape
  • 18-gauge wire
  • pet containment product with collar
  • PVC conduit
  • shovel (or trencher or simple edger)
  • wooden paint stirrer
  • extra flags
  • cut-off saw (optional)
  • driveway sealant (optional)

Step 1: Measure Your Property

Before you order your product of choice, measure your property's circumference to determine how much wire you need. Use a 100' tape measure for this, and walk the path you intend to install your underground wire.

If you’re looking to block out islands within your yard, such as around a pool, garden or landscape, measure the distance from the nearest edge of the property, inward towards the island, fully around the island, and then back out the same path towards the outer loop. The wires you place leading to and from the island will be twisted together, which negates the charge. When twisted, the pet can still cross over the wire but will remain restricted from the island itself.

Price out the wire you need. Most common lengths are between 250-1,500 feet, but longer is available too.

Installing 18-gauge wire for underground fencing.

How to Install an Underground Wire Fence For Your Pet

Learn the DIY way to install an underground "invisible" fence around the edge of your yard.

Photo by: Emily Fazio

Emily Fazio

Step 2: Order Product and Test the Wire

If your standard kit comes with a traditional 15-gauge wire, consider upgrading to an 18-gauge wire. The more durable the wire, the less likely it is to get damaged during installation or from burrowing animals.

Test the wire first by hooking both ends of the wire into the electrical box and testing for a beep-zap. If the product or wire is damaged, it’s better to know before you install it underground.

Step 3: Cut Across Your Driveway

If you have a concrete or asphalt driveway, rent a cut-off saw (or hire someone with one) to make cutting a crevice clean and easy.

When you’re using a tool like this, take your time and score the top layer first. After the top layer has been notched, check to see if the cut is wide enough for your wire. Our 18-gauge wire required a slightly wider trench. Run the saw over the line again 2-3 times to deepen it (You want the wire to sit about an inch below the surface if possible), and widen it if necessary. Once you've buried the wire, apply a sealant into the crack to help prevent deterioration. The sealant products that come in a squeeze bottle with a nozzle are perfect for this application.

Do you have a gravel driveway? Thread the wire through a length of an old rubber garden hose or PVC piping before burying it.

Step 4: Bury the Wire

Putting the wire underground is the easiest part of the installation and the most physically taxing. You can rent a trencher to make it easier, but a spade shovel or a simple manual edger works, too. We were able to dig and install our 850-foot length of wire by hand (no trencher) in one afternoon.

Unroll an excess length of wire where you will plug it in the electrical box, then extend the wire along the first 50 feet of the path as a guide. Create a straight trench 3”-6” deep, and bury the wire as you go (Image 1). The wire needs only to be below the surface, but it’ll be more protected if it is deeper. The fastest thing to do is have one person cutting the trench and a second person putting the wire into the cut soil.

In most areas, I was able to nestle the wire close to the earth and pin it in position with landscaping staples. In areas where the coverage wasn’t as thick, I cut a trench with the shovel and buried the wire just under the surface so that it isn’t a tripping hazard for wildlife. Use a blunt object like a paint stick to help plunge the wire into the narrow trench without damaging it (Image 2). Place the flags about every 10’ as you go.

Step 5: Address Exposed Areas

Rodents and other wildlife can nibble the wire if it is easily visible and accessible, such as in areas where the wire is coming up from the ground near the plug. To deter pests and protect against weather, use pieces of PVC conduit piping to guard any ground-level wires. We ran our wire through a garage wall and up directly into the mechanism that plugs into the wall, so there's no visible wire.

PVC conduit to protect wire where it emerges from the ground.

How to Install an Underground Wire Fence For Your Pet

Learn the DIY way to install an underground "invisible" fence around the edge of your yard.

Photo by: Emily Fazio

Emily Fazio

Step 6: Set it Up and Train Fido

Follow official training docs for the best success. Your pup will become accustomed to the warning beeps, and with any luck, will remain safely in the boundaries set by the fence.

Training a puppy with an underground wire fence.

How to Install an Underground Wire Fence For Your Pet

Learn the DIY way to install an underground "invisible" fence around the edge of your yard.

Photo by: Emily Fazio

Emily Fazio

Next Up

How to Install Garden Lights

Whether you're after that cozy glowing garden look or you simply need to safely traverse your garden after nightfall, here are simple steps for installing garden lighting.

How to Install Glass Shower Doors

Here's how to replace your dingy shower curtain with a gorgeous sliding glass shower door yourself.

8 Best Electric Pruning Shears of 2026, Tested and Reviewed

Make your pruning chores easier with these top electric pruners.

How to Install French Drains

Divert groundwater from the basement or foundation with the help of gravel and fabric.

20 Best Personalized Gifts for Pets and Pet Lovers

There's nothing quite like the unconditional love of a pet. Shop our favorite personalized gift ideas for pets and pet lovers — including yourself!

The Best Pet-Friendly Couches of 2026

Having pets doesn't mean you have to let your sofa go to the dogs (and cats). Discover the best fabric for a pet-friendly couch, along with tips for choosing the sofa that's right for you and your furry friend.

How to Paint a Deck

All you need is one weekend to give your deck a whole new look and protect it for years to come.

'Zillow Gone Wild' Tours a 16,000-Square-Foot Vegas Fallout Shelter That Would Cost $50 Million to Build Today

The Las Vegas "Underground House" was built in 1974 and was the fourth of its kind, featuring a still-fully-functioning kitchen and luxury "outdoor" spaces.

How to Clean a Shower

Here's how you get rid of soap scum and shower grime so that your once-sparkly shower can shine again.

How to Clean a Faucet Head​

A dirty faucet head can affect your water pressure and the flavor of your water. Here's an easy way to keep it clean.

Go Shopping

Get product recommendations from HGTV editors, plus can’t-miss sales and deals.

On TV

About HGTV

HGTV’s expert editors and writers share home decorating, garden and home improvement ideas, inspiration and advice based on our brand’s 30+ years of expertise and experience. We also give you the latest updates on HGTV shows and stars, cleaning tips and shopping recommendations. Learn more about us and our editorial standards.