Your first decision is whether anyone could get hurt. If your dog lunges, snarls or snaps at the fence, tries to climb or dig out, can push their nose or paws through gaps, or fights with a dog on the other side, don't leave them in the yard on their own at all. Take them out on a leash, keep them well back from the fence, and talk to your vet and a qualified reward-based behavior professional. The Richmond SPCA warns that fence fighting can result in harm to another person or animal.
If your dog only barks and runs the fence line, the plan is simpler. Go out with your dog, block their view of the busiest stretch, keep them back from the fence, and reward them for looking at passersby calmly or checking in with you.
Don't use shock collars, spray collars or any other punishment for fence barking. It can make your dog more upset about people passing by.
Check the fence for gaps and escape routes
Before you start any training, look at your yard from both sides of the fence.
- Check for gaps, loose boards or holes where a dog could push through, or where a passerby could reach in.
- Check for low sections, things your dog could climb on, or places where they've started digging under.
- Notice where children, other dogs or delivery people walk closest to the fence.
- Notice whether your dog can reach the gate when someone opens it.
Fix anything you can, such as blocking gaps or moving garden furniture away from the fence. If someone might reach over or through to touch your dog, keep your dog well away from that stretch of fence until you can change it. It can also help to let nearby neighbors know you're working on the barking, so they understand why your dog may be out on a leash for a while.
If your dog has ever bitten, grabbed or scratched someone through a fence, or fought with a neighbor's dog through it, keep your dog on a leash in the yard until you've talked to your vet and a qualified behavior professional.
Stop leaving your dog alone in the yard for now
The Richmond SPCA notes that dogs left alone in the yard are likely to bark and possibly fence fight. Each time your dog runs the fence and the person walks away, the barking seems to have worked, so it gets more likely next time.
For now:
- Go out with your dog every time, even for quick potty trips.
- Keep yard time short and planned, rather than leaving your dog out to entertain themselves.
- Avoid the busiest times, such as when children walk home from school or when a neighbor walks their dog, until your dog is calmer.
- Bring your dog in before they get wound up, not after they've been barking for a while.
It helps to keep a quick note for a week of when people usually pass and when your dog barks most. You'll often find a few busy times, such as school drop-off and pickup or the evening dog-walking rush. Plan potty trips and yard play around those times, and use quieter times for training.
The Wisconsin Humane Society recommends that owners manage the environment so these dogs do not have the opportunity to keep practicing barking at windows and fence lines.
If your dog struggles to come back inside once they're outside, keep them on a leash or long line you hold, so you can calmly bring them in.

Block the view along the busiest stretch
Many dogs bark less when they can't see people passing. The Richmond SPCA suggests you limit his ability to see what is going on outside of your fence, and notes this can often be done with basic items from the hardware store.
Ideas include:
- Privacy screening or fence slats fixed to a chain link or wire fence.
- Reed or bamboo screening along the inside of a fence.
- Large planters, raised beds or a second low barrier inside the fence line, to keep your dog a few feet back.
- Closing off the side yard or the stretch nearest the sidewalk with a garden gate or temporary fencing.
Check that anything you add is secure, can't be chewed or swallowed, and doesn't give your dog something to climb on. If you rent, ask your landlord before making changes.
Blocking the view won't solve everything, because your dog can still hear and smell people. But it can lower the barking enough for training to work.

Tell alert barking from frustrated or worried barking
How your dog barks tells you how gently you need to start.
Alert barking often looks like this:
- A few barks when someone passes, then your dog stops.
- Your dog comes back to you, or goes back to sniffing or playing.
- Their body is upright but loose, and they take treats.
Frustrated barking often looks like this:
- Running up and down the fence, often fast and with high-pitched barks or whines.
- Jumping at the fence, or staying fixed on the spot where people pass.
- Your dog can't be called away and won't take treats.
Worried barking often looks like this:
- Barking while backing off, or from a distance.
- Hackles up, tail low or tucked, and ears back.
- Your dog stays tense or keeps watching the fence long after the person has gone.
Our guide to reading dog body language in context explains how to read these signs together rather than one at a time.
After each yard session, choose one of these:
- Your dog looked at passersby, stayed calm and took treats: carry on. Next session, you can stand slightly closer to the fence or go out at a slightly busier time.
- Your dog barked once or twice but came back to you and took treats: stay at that distance for the rest of the session, and keep the session short.
- Your dog kept barking, ran the fence or stopped taking treats: calmly lead them inside and end the session. Next session, start farther from the fence or at a quieter time, once your dog is calm.
- Your dog lunged, snarled, tried to get over, under or through the fence, or fought with another dog: stop yard practice, keep your dog leashed or inside, and get help.
Example: two dogs at the same fence
For example, picture two dogs whose yards back onto the same busy path.
Daisy, a two-year-old beagle mix, barks three times when a jogger passes, then trots back to her owner, who's standing by the back door with treats. That's alert barking. Her owner stays at that distance for the rest of the session, giving Daisy a treat each time she looks at a passerby and back. Next time, they start at the same distance. They only try moving closer after Daisy stays relaxed and takes treats through several passersby in a row.
Rocco, a three-year-old shepherd mix, sprints along the fence when the neighbor walks their dog. He jumps at the boards, snarls and ignores the chicken his owner offers. That's frustrated barking, and it could easily turn into fence fighting. His owner calmly leads him inside on his leash and ends the session. From now on, Rocco only goes out on a leash, away from the shared fence, and his owner books a vet check and a behavior professional.

Set up short, supervised yard sessions
Once you've blocked the view where you can, start practicing with your dog in the yard. Keep sessions short, a few minutes at first.
To prepare:
- Put your dog on a flat collar or harness and a leash or long line. Hold the leash in one hand, and keep treats in a pouch so your other hand can give them.
- Choose small, soft treats your dog loves. Our guide to choosing training rewards can help if your dog ignores ordinary treats outdoors.
- Start well back from the fence, at a distance where your dog notices people passing but can still take treats calmly.
- Pick a time when people pass now and then, not a constant stream.
If your dog can't take treats even at the far end of your yard, practice in a quieter place first, such as inside by the back door, and get help from a qualified professional.
Give your dog a treat when someone passes
Teach your dog that people passing the fence means something good. The Wisconsin Humane Society suggests that for a dog who finds something scary, you feed them high-value treats in the presence of that scary item.
In each session:
- When your dog notices someone passing, give a treat straight away, before they start barking.
- Keep giving treats one after another while the person is in view.
- When the person has gone, stop the treats and relax.
- Repeat each time someone passes.
Give treats even if your dog looks at the person, because looking is fine. If your dog barks once and then turns back to you, give a treat for turning back.
Purdue University's Canine Welfare Science team notes that if a dog looks fearful, barks, or will not eat a treat, the trigger is too close. Use the same rule here: if your dog stops eating, move farther from the fence or go inside.
Bring your dog inside calmly when they can't settle
Ending a session well matters as much as starting it. If your dog is barking, running the fence or won't take treats, it's time to go in.
- Stay calm and quiet. Don't shout your dog's name over and over.
- If your dog is on a leash, walk them toward the door, away from the fence, without dragging.
- Toss a treat or two on the ground in the direction of the door, then follow your dog inside.
- Once inside, give your dog something calm to do, such as a chew on their bed.
Practice coming inside when nothing is happening, too. Call your dog to the door a few times during quiet yard time, give a great treat, and sometimes let them go back out. That way, coming in doesn't always mean the fun is over.
If that's still a struggle on quiet days, here's how to get your dog inside without a chase.
If your dog won't leave the fence even on a leash, or tries to bite the leash or your hands when you lead them away, stop yard practice and get help from a qualified professional.
Teach your dog to check in with you
As well as changing how your dog feels about passersby, give them something to do instead of barking. The Richmond SPCA suggests that when people and animals pass, you play games with your dog and try to focus his attention on you.
Some simple ways to do that:
- Reward your dog every time they look at you in the yard, especially just after looking at the fence.
- Teach a nose touch to your hand indoors first. Our guide to teaching your dog to touch your hand with their nose explains how. Then use it in the yard to move your dog a few feet away from the fence.
- Play a short game of tug or fetch away from the fence line when someone is about to pass.
Practice these when no one is passing first, so your dog knows them well before you use them with a distraction.
If your dog can't respond to a cue they know well, the distraction is too strong. Move farther from the fence, or go inside and try again next session.
When to move closer to the fence
Once your dog stays relaxed and takes treats through several passersby in a row, make one thing slightly harder. Change only one thing at a time:
- Distance: stand a little closer to the fence.
- Time of day: go out when slightly more people pass.
- Type of passerby: add people your dog finds harder, such as joggers, bikes or people with dogs.
- Freedom: let the long line trail on the ground while you stay close, or drop the leash in a small, secure part of the yard.
Go back to the previous level straight away if your dog starts barking repeatedly or stops eating. Use the same choices after each session: carry on, stay at the same level, end the session and start easier next time, or stop and get help.
When your dog is calm with passersby at a normal distance, you can start to let them spend short spells in the yard with you nearby but not actively training. Keep treats handy, and keep blocking the view along the busiest stretch. Even a dog who has improved may slip back if left alone in the yard for long periods, so keep supervising.

Give your dog a better job in the yard
A bored dog in a yard often finds the fence the most interesting thing out there. The Wisconsin Humane Society advises owners to make sure they're providing daily mental and physical enrichment.
Ideas for the yard:
- Scatter part of your dog's meal in the grass for them to sniff out, well away from the fence.
- Hide a few treats or a food toy near the back door.
- Play short games of fetch or tug with you.
- Give your dog a chew on a mat near you while you garden or sit outside.
Walks with time to sniff also help, so your dog isn't relying on the yard for all their excitement.
Don't use bark collars or punishment
Punishing fence barking may stop it for a moment, but it can make a dog more upset about people passing. The Richmond SPCA says it does not recommend the use of aversive sound collars or electric collars, warning that dogs can link people or animals with pain. The Wisconsin Humane Society also says, we do not recommend using bark collars of any type.
Also avoid:
- Shouting at your dog, which can sound like you're joining in.
- Spraying water or throwing things.
- Electric or invisible fencing to keep your dog back from the fence line.
Instead, use supervision and visual barriers to prevent barking, and treats and games to reward calm behavior.
Get help when barking turns into lunging or fence fighting
Talk to your vet and a qualified reward-based behavior professional if:
- Your dog lunges, snarls, snaps or bites at the fence.
- Your dog has fought with a neighbor's dog through the fence, or tried to.
- Your dog also reacts strongly to people or dogs on walks, at windows or at the door.
- Your dog won't take treats in the yard, even far from the fence.
- The barking started suddenly, or your dog seems unwell or more sensitive to noise.
The Wisconsin Humane Society suggests working with a Certified Professional Dog Trainer who practices positive reinforcement. Our guide on when to seek professional behavior help explains what that help looks like and how to prepare.
While you wait for help, keep your dog on a leash in the yard, away from the fence, and keep yard visits short.
Fix common fence-barking problems
Your dog barks at the neighbor's dog through the fence
This can turn into fence fighting quickly. Talk to your neighbor, and try to arrange yard times so the dogs aren't out together. Block the view along the shared fence, keep your dog on a leash near it, and get help if either dog lunges or snarls.
Children tease your dog through the fence
Keep your dog inside at the times children usually pass, and block the view along that stretch. If you can, talk to the families or the school. Never let your dog near a fence where children might reach through.
Your dog barks at delivery drivers
Bring your dog inside when you're expecting a delivery, or keep them on a leash near you. Practice pairing passersby with treats at quieter times first.
You have two dogs who bark together
Take each dog out separately for training, so they don't wind each other up. Some dogs who are excited at the fence may turn and snap at each other, so supervise closely and keep yard time short when they're out together.
Your dog only barks at certain people
Notice who sets your dog off, such as people with strollers, bikes or other dogs. Start practice with easier passersby, and add harder ones only when your dog is calm with the easy ones.
Your dog barks when you're not home
If your dog spends time in the yard while you're out, bring them inside instead, with something to chew. If your dog seems distressed when left alone indoors, talk to your vet or a behavior professional.
Your dog digs at or chews the fence
Digging and chewing at the fence can mean your dog is very frustrated, and it can damage the fence or hurt your dog. Keep your dog on a leash near that stretch, block the view, and check the fence regularly for damage. If digging or chewing continues even with supervision, talk to a qualified professional.
Your dog is fine on walks but barks at the fence
Many dogs behave differently behind a barrier than they do out on a walk. That's common, and it doesn't mean your dog will behave the same way off the property. Work on the fence situation specifically, using the same supervised sessions, view blocking and treats.