How to Train a Dog to Stay Inside the Yard

By: David Codr

Published Date: March 2, 2017

Cooper and Echo - How to Train a Dog to Stay Inside the Yard

Cooper is a nine-month-old Yellow Lab who lives in Waterloo with Echo a seven-month-old Australian Shepherd Border Collie mix. The puppies guardians set up a puppy training session with me to stop Echo from pulling on the leash and stay in the yard instead of running through the electric fence.

The dogs were in their kennel when I arrived for the session and were pretty excited as the guardian  let them out.

I recommended that the guardians start adding a pause to letting the dogs out of the kennel. Many people mistake excited for happy. But when a dog is over excited, its in an unbalanced state of mind. Just like humans, dogs have difficulty concentrating when in an unbalanced state of mind.

I prefer to open the kennel door then stand in the doorway to block them from exciting. I wait for the dogs to settle down before letting them out. This way I am rewarding a calm and balanced state of mind and helping the dog learn to adopt this calm energy on their own as that is how they can exit the kennel.

Delaying gratification this way can help dogs build up self control which in an important skill to have. I recommended that the guardians look for other situations where they can delay granting the dog permission this way. The more your dog restrains itself, the more prepared they are to listen to you and behave how you want in other situations.

I recommended that the guardians incorporate some rules and showed them how to enforce them and establish invisible boundaries using non verbal communication cues. I also suggested that they add structure to petting the dogs and use passive training to reward the dogs for desired actions and behaviors.

Because Echo is a higher energy dog, it will be important for the guardians to increase her exercise each day. Having too much pent up energy is almost certainly a contributing factor to Echo’s running through the electric fence.

Before starting to work with Echo on respecting the boundary to the yard, I took her outside for a little dog skiing. I have found that rollerblades are one of the best ways to exercise a dog. This gives the human the ability to move at a rate of speed that helps the dog burn off excess energy far more efficiently than a walk.

Fortunately one of Echo’s guardians also roller blades so once I demonstrated how to dog ski with Echo, she took the leash and had equal success. If the guardian can make a 20-30 minute dog skiing run a part of the morning routine, they should see a noticeable improvement in her behavior and manageability.

Once we had burned off the excess energy, I spent a few minutes sharing some loose leash training tips. It didn’t take long for Echo to catch on and was walking next to her guardian with no tension on the leash in no time.

After the leash training, we headed back inside so I could show the guardians how to do some boundary training to teach Echo to respect a boundary without needing an e-collar.

Now for the first stage of this technique, you want to train the dog to approach the flag, and reward it for doing so. This seems counterintuitive if your goal is to have a dog stay inside the area marked by these flags. But we need to introduce the reward and relate it to the flag. Because Echo had a negative association with the flags due to previous interactions (shocks when approaching them), I had to place the treat on the flag.

Once the negative association is gone, then the guardians should be able to get the dog to approach the flag without a treat on top. When she touches the flag with her nose, the guardians should click, then give her a treat when she walks back to them (only a foot or so away). The idea is to get the dog to go to the flag, touch it, then move away (back to you) to get her treat. This allows us to train the dog to move away from the flag. Once the guardians get to this stage, they should start moving the flag progressively farther away each time. I like to practice this step in side the house for a week to really establish this behavior.

One note, I made an error by clicking a second time when Echo went over, touched the flag and then came back to me. When practicing this exercise, only one click should be given and it should be when the dog touches the flag, not when it gets the treat.

Once the dog is consistently approaching the flags and coming back to the human for the reward, its time to move this exercise outside. I recommend the guardians use a different color flag and move them a foot or two inside the line the existing flags are, then removing the original flags completely.

The next step is to put Echo on a long leash (10-15 feet) and then take her outside to where the flags are. She should go over to the nearest flag and touch it with her nose. The guardians should immediately click when she does, then give her a treat when she moves away from the flag and comes back to the human. The human should stay about 10 feet inside the new flag boundary while doing this.

The humans should practice this step multiple times a day (three or more practice sessions spread over the course of the day) in short 1-2 minute training sessions (about 10-25 treats per practice round). They should practice this exercise at different parts of the flag boundary to help the dog understand it encompasses the entire property.

If the guardians practice this enough, the dog will start returning to the guardian automatically. This technique is called classical conditioning (like Pavlov’s dog) and is an excellent way to train a dog to respond a certain way when encountering a specific trigger.

The guardians will need to continue to practice approaching the flag while on a leash, then returning to the humans for multiple weeks (5-9 weeks depending on the dog). The more the humans practice this exercise, the better the dog will respond so a lot of short practice sessions are key to success.

After a few weeks, Echo should be getting better at returning to the humans. When this is the case, its a good idea to start increasing the distance the human stands away. Starting out at ten feet is a good distance initially, but eventually we want to be up to 50 or so feet behind (inside) the boundary.

Now when to practice is an important element when it comes to a dog succeeding. If there are dogs running free in the next yard, squirrels rabbits or other animals playing close by, its going to be very hard for the dog to focus. So if any distractions are present, the guardians should delay practice until the distractions are not around.

Now this is not to say we dont want distractions. We want to avoid them at first, but once the dog has been practicing the exercise on the leash for a week or two outside, adding in mild distractions is important. The dog will be experiencing distractions and temptations in the future, so we need to prepare them for this by practicing them, just in stages.

The key is to go slow and gradually increase the intensity of the distractions. We can do this by increasing the distance between it and Echo’s yard or having the distractor moving slowly or staying still. The guardians would be well advised to enlist the help of neighbor dogs that they can control and direct. If Echo has difficulty focusing on the training, the guardians should increase the distance and keep practicing at that mark until the dog can perform correctly consistently before increasing the intensity again.

The final step is to practice again, but without the leash. When making this transition, the guardians should find a time with little to no distractions going on outside to put the dog in a position to succeed. More than anything, we want to keep the dog from running through the boundary and decreasing or eliminating temptation is a sound strategy in this regard. It is possible that the guardians may need to go back to using the leash if the dog bolts. This is not unusual and is simply an indication that the dog needs more practice at the lower level.

If Echo does run off, it will be important for the guardians to NOT punish her for doing so. They should simply call her back and reward and encourage her when she does. Dogs learn through association and timing is important. So if the dog escapes, you call her back then correct or punish her for crossing the boundary, the dog sees it as coming back into the yard is punished which will reduce her desire to repeat this action in the future. So if she runs off, reward richly for a return and go back a step and practice on the leash for a few more days.


  • Increase Echo’s daily exercise, especially early in the day.
  • Practice the leash training technique after roller blading to help Echo practice walking with a loose leash in a heel.
  • Pet the dogs with a purpose.
  • Only release the dogs from the kennel when completely calm.
  • Stop petting the dogs when over excited like when coming home, or getting out of the kennel.
  • Use passive training to reward the dogs for desired actions and behaviors.
  • Only use the command word when rewarding the dog. Avoid using good boy, etc.
  • Practice training the dogs to go to the dog bed using the command word “cabo” as demonstrated.
  • Introduce rules and boundaries inside the house and enforce them consistently.
  • Have friends and family members pretend to visit (texting ahead of time) so the humans can practice claiming the door with the dogs behind an invisible boundary.
  • Practice the come exercise with Echo inside the house using the cupped hand technique.
  • Gradually increase the distance as the dog gets better at this skill
  • Disagree or reward the dog within 3 seconds to help it understand why you are giving it attention.
  • Provide the dogs with plenty of toys and things to do in the yard. Making the yard more appealing will decrease the dog’s desire to explore.
  • Practice the flag exercise as detailed in the above video and text. Go at her pace and practice, practice, practice.
Tags: , , , , , , , , ,

Categorized in:

This post was written by: David Codr