Boundary Training

How to train your dog to stay in your yard (and how it should not be done)


Yes, it’s possible to train a dog to stay in your yard. But you must accept the fact that this training cannot be relied on to prevent your dog from leaving your yard if faced with something that’s tempting enough. Nor will it protect your dog from being attacked by another dog or wild animal, nor stolen by an admiring passerby. A physical fence is the best protection from all of these threats!

Even with these limitations, however, training your dog to stay within certain boundaries is a worthwhile project – especially in those neighborhoods with homeowners’ associations that prohibit fences. Just understand that you must ask for this behavior only when you are present, so you can take immediate steps to retrieve or protect your dog if needed.

We recommend approaching this training goal like any other behavior: by using positive reinforcement to teach the dog where we want her to be.

Boundary Train Your Dog

Here’s how to boundary train the force-free/pain-free way:

  1. Mark the corners of your yard with stakes. Attach a long rope (or ropes) around the perimeter to create a visual barrier.
  2. Have a selection of high-value treats in your treat pouch.
  3. Attach a long line to your dog’s collar or harness. Walk around the yard with her on a loose long line – no pressure on her collar – but short enough you can restrain her if she’s about to cross the boundary.
  4. Choose a new cue that means “stop and come back” – one specific to the boundary – not one you already use for training. Some suggestions: “Edge,” “Fence,” “Wall,” “Brink” – anything you want, it doesn’t have to literally mean “boundary.”
  5. Walk with your dog near the barrier. Anytime she approaches the rope use your cheerful “Fence!” cue and feed her a tasty treat. Soon you’ll see her perk up and look at you when you say “Fence!”
  6. Gradually move farther away from the boundary. When she approaches the edge, give your cheerful “Fence” cue and run a few steps toward the interior of your yard (away from the boundary). You want “Fence” to mean “Stop what you’re doing, come get your treat and have a party!” – similar to a happy recall. In time you’ll easily be able to ask her to move back from the border, and eventually you may not have to call her back at all – she’ll know to stop of her own accord. (You can still reward with a treat!)
  7. Next, add distractions – such as a person walking by – then try it without the long line.
  8. When she’s very solid, gradually lower the rope barrier, then remove it altogether (or leave it up if you want!).

With your very useful boundary cue installed you can be in your unfenced yard with your dog off leash and be reasonably confident she’ll stay in the yard, perhaps with an occasional “Fence!” reminder. Just remember: You should not expect this to work when you aren’t present. Sooner or later there’s a distraction tempting enough to compel almost any dog to cross that line.

Yorkshire Terrier Dog running on the green grass
You can teach your dog to stay in your unfenced yard, but you should expect to use this cue only when you are present. Photo by Yevgen Romanenko, Getty Images.
No shock collars

We do not recommend the use of any collar-based “training” systems, whether a buried wire or GPS is used to establish the boundary. The manufacturers have tried countless ways to convince people that these devices don’t hurt the dog, but face facts: They wouldn’t work at all if they weren’t painful – and no amount of pain can prevent some dogs from running through the shocking boundary zone if they are motivated enough. Countless stray dogs turn up in animal shelters wearing those devices. There’s currently a class action lawsuit filed in a California Federal court against Radio Systems, manufacturer of the PetSafe shock collar, in which the plaintiff claims the company falsely markets the collars as safe and harmless to use on animals, when they in fact harm pets.

Previous articleFido, Clean Your Room!
Next articleCamping With Your Dog
Pat Miller, CBCC-KA, CPDT-KA, grew up in a family that was blessed with lots of animal companions: dogs, cats, horses, rabbits, goats, and more, and has maintained that model ever since. She spent the first 20 years of her professional life working at the Marin Humane Society in Marin County, California, for most of that time as a humane officer and director of operations. She continually studied the art and science of dog training and behavior during that time, and in 1996, left MHS to start her own training and behavior business, Peaceable Paws. Pat has earned a number of titles from various training organizations, including Certified Behavior Consultant Canine-Knowledge Assessed (CBCC-KA) and Certified Professional Dog Trainer - Knowledge Assessed (CPDT-KA). She also founded Peaceable Paws Academies for teaching and credentialing dog training and behavior professionals, who can earn "Pat Miller Certified Trainer" certifications. She and her husband Paul and an ever-changing number of dogs, horses, and other animal companions live on their 80-acre farm in Fairplay, Maryland.


  1. Pat, you’re painting with a pretty wide brush when stating ecollars should never be used. Or that most trainers do not recommend using them, please provide your polling data. First, there is a bias in your article. You call them shock collars. You point out the misuse of this device, and leave out that all training methods can be poorly executed. Many dogs have been trained to avoid rattlesnakes with this form of correction.

    What are eCollars. They are a form of correction much like a martingale collar or a muzzle. They can beep, vibrate or deliver an electrical stimuli. I agree in the hands of some they can be used inappropriately. They should never be the first method of training. They should only be used after being trained on the correct use. They should never be used to punish your dog. The correction should always be quick and fair with rewards given when the desired behavior is provided. The eCollar is used to get the dogs attention to the command and desired response.

    So where is an eCollar appropriately used beneficial? We rescued a terrier mix puppy from our local shelter. She was easily housed trained and quickly learned basic commands. Her attention span is unparalleled. Her problems were Squirrels or other distractions. Our goal was to teach her to “leave it” and immediately return. She is not food motivated. We attempted many behavior techniques with many different trainers. We could see that she understood what to do but when her hunting hard wiring turned on she was oblivious. Numerous techniques were attempted to interrupt this drive to no avail.

    We had a specific goal, and a specific purpose when deciding to use an eCollar. The goal was to break the hard wire connection when chasing another animal so she would respond to the command. We did not use this training aid for any other purpose. We used the minimum setting ( 2 or 3 on a scale of 1 to 100). We personally experience this level of correction. It was not painful. We took a class with a trainer (I would never subscribe using this device out of the box). The emphasis was quick, fair, consistent correction when bolting after an animal and not responding to a verbal command. An immediate reward was always offered with the correct behavior.

    Where are we today? A very happy well adjusted canine companion. Great with kids. Can be left in the house alone when we go out. Great on walks, unleashed on our Forrest trails. Great recall. Of our many companions, she is the best fly fishing dog of the lot. She is still interested in squirrels (her ability to track the from afar and in trees is amazing) but will turn off the passion on command. We no longer use the eCollar.

    So I would hope that you and Nancy would be more eclectic on the forms of training aids and their appropriate use. This technique saves dogs from being bitten by snakes. When applied to difficult unwanted behaviors improve the life of the dog. Being pedantic will only lead to more unneeded frustration between dogs and their owners.