Squirrels are the worst version of this problem, and it isn't close. A squirrel moves, freezes, moves again, flicks its tail, then runs straight up something the dog can't climb. That is about the most exciting thing a dog can watch, and most dogs get to watch it from the couch for free, all day, with nobody home. The window is a big trigger, and barking when someone comes to the door is another.
So before any training, be clear about what you're up against. You can't make squirrels boring. Nobody can. What you can do is stop the dog from rehearsing it when you're not there, and teach a different response for the moments you are.
Why he does it
Most dogs that bark at squirrels aren't guarding anything. They want to chase. The glass or the fence or the tree trunk is in the way, and the barking is frustration leaking out the sides. You'll see the same engine in the dog who barks at cars, and in the dog who stands at the base of an oak barking at the spot a squirrel disappeared into ten minutes ago.
The barking-up-a-tree dog is the one people find most baffling, because there's nothing there. From the dog's side there's absolutely something there. It went up. It will come down. He's waiting. Dogs will do this for an hour if you let them, and every minute of it is practice.
That's the word to hold onto. Practice. Every unsupervised session at the window makes the next one quicker to start and harder to stop. So the first job is cutting the practice, and the second job is the training. Not the other way round.
Cars, for what it's worth, are the same drive with worse consequences, so that dog gets more distance and a long line from day one. The method doesn't change.
Where it happens
Walk your house and find the vantage points. There's usually one window, one spot on the back of the couch, one deck door. Cover the bottom 3 feet of the glass with frosted window film, the kind you cut with scissors and press on with a spray bottle of water. It costs about what a bag of treats costs, peels off clean later, and still lets the light in. If he launches from the couch, pull the couch 2 feet off the wall so it's not a platform anymore. When you leave the house, he's either in a room with no squirrel view or in a crate with the blinds down.
We're not being dramatic about this. The window is where the habit gets built.
Our page on the dog who barks at the window walks through the film and furniture setup in more detail if the window is the whole problem for you.
The yard is harder. You can't frost a fence. Rule for now: he doesn't go out alone. You go with him, and if he bolts for the tree line the second the door opens, he's on a 20 foot long line clipped to a harness, not the collar, so you can step on it when you need to. Yes, that's annoying. It's temporary.
Early morning and the hour before dusk are when squirrels are busiest. Plan potty trips around that for a few weeks and you'll have a lot fewer incidents to manage, which means a lot less practice.
The marker game
This is the actual training. It's simple to describe and tedious to do.
Pick a word. We use "yes." The dog sees a squirrel, you say "yes" the instant he notices and before the first bark, and you feed something good. Not kibble. Cheese, deli turkey, the stuff he doesn't normally get. The squirrel does something else, you say "yes" again, feed again. Over a lot of repetitions the dog starts turning to you when a squirrel shows up, because squirrels have started to predict turkey.
Distance is everything. Start across the room from the window, not nose to glass. If he can't eat, you're too close. Back up until he can. Some dogs can start 10 feet back from the window. Some start at the kitchen table with the squirrel barely visible. The first sessions might be 2 minutes long and you'll feed 20 pieces of turkey. That's normal, and it's what the deli turkey is for.
It's the same game we use for leash barking at other dogs, and we go through the whole sequence on our stop barking at other dogs page.
Once it works through the window, take it to the yard on the long line. Stand well back from the trees. Squirrel appears, "yes," feed. Over weeks, you creep closer. If he blows past the food and hits the end of the line, you went too far too fast. Go back to yesterday's distance and stay there a few more days. Many owners notice the same pattern with other fast-moving animals, and the steps for a dog barking at the cat work much the same way.
Add a recall once the marker is working. Call him when the squirrel's gone up, feed big, then say "go look" and let him go back and stare. Letting him go back is a reward too, and a good one. Dogs figure this out faster than you'd think: come to you and you'll hand out permission to go watch the tree again.
When he's already at the trunk screaming, the training window has closed. Don't yell, it reads as joining in. Walk over, take the line or the harness, and walk him 30 feet away without saying much. Wait until he takes a breath and glances at you. Then feed, and go inside. You're not punishing anything. You're ending the session before it gets any longer.
Five minutes a day with a flirt pole in the yard helps more than people expect. He gets to chase and catch something on your terms, with rules: wait, chase, drop, wait again. A dog who's had a real chase that morning tends to have a shorter fuse for the fake one at the window.
Expect weeks, not days, and expect fall to be worse than June because the squirrels are frantic about acorns. Some dogs get to the point where they glance at a squirrel and then look at you. Some get to the point where they bark twice and come when called. Both are a lot better than what you have now, and the second one is a perfectly fine place to land.
If the squirrel is one of a dozen things setting him off, start with our page on stopping a dog barking at everything, because the film, the distance, and the marker word apply to all of it.
Our guide Calm at the Door in 21 Days is built around visitors, but the distance work and the marker word in it are the same ones you'd use here.

Calm at the Door in 21 Days
The 21-day plan for dogs who bark at the doorbell, the window and every visitor. 10 minutes a day, reward-based, 6 printable tools.
See the plan →Not sure yet? Take the free 2-minute quiz
Educational content from the CalmDoor team. Not veterinary or behavioral advice for your specific dog. If your dog has bitten, or behavior changed suddenly, see your veterinarian and a certified professional.











