It’s important to make sure your dog never escapes his yard, both for his own safety and for the benefit of your neighbors. The best way to keep a dog inside his yard fence is to make sure he is never motivated to test its ability to hold him, and never let him learn escape is possible. Left at home alone, a dog may try to escape to follow you, to seek the company of other dogs, or because something makes him anxious. If he's succeeded once, he'll get the idea again. Do not leave your dog in the yard when you're not at home to supervise. Give him a secure, safe, comfortable and escape-proof place where he can rest when you have to leave without him. When you let your dog out in the fenced yard, you can keep him there by making tunneling or scaling the fence impossible, and by correcting unwanted behavior.
Build a yard fence that is high enough that your dog will not consider jumping or scaling it.
Bury the first few inches of your chain-link fence when you install it, or dig a small trench around the fence line of an existing fence. Fill the trench with bricks, rocks or other hard material, and cover it over with soil. This prevents your dog from digging his way under the fence. Alternatively, put in a pathway of brick or concrete pavers along the base of the fence to discourage thoughts of digging while adding a landscaping touch to the yard.
Repair any holes or other damage in the fence. Even if the gaps appear to be too high or too small to get through, this is a worthwhile job. Curiosity can tempt your dog to try to escape the yard. If he can see through the fence, he’s more likely to want to investigate.
Remove any objects that may assist your dog in getting over the fence. For example, trash cans or other large objects placed too near the fence make the perfect launch pad for a dog seeking to leave the yard.
Put a long leash on your dog, and let him roam in the yard. If he attempts to scale the fence, restrain him and give him a verbal correction. For example, say “down.” After an interval, allow him to continue roaming. Repeat the verbal correction and restraint combination as needed.
Take the dog inside and play with him to take his mind off the fence.
Remove the leash, put your dog in the yard, and monitor his behavior. When he approaches the fence, call his name to distract him. Reward him with food or a toy as soon as he turns his attention from the fence to you. As you give him the reward, shake your keys or click a pen or use a clicker designed for obedience training. Over time, your dog will associate the distinctive sound with the reward. After the association is firmly in the dog’s mind, the sound alone can serve as positive reinforcement for a desired behavior, as long as you occasionally give a treat as well.
Make sure you are giving your dog plenty of daily exercise and spending time with him, training him, grooming him and playing his favorite games with him daily. Take him with you as much as possible when you go places, and introduce him to new environments, people and dogs. Take him on hikes, bicycling or to the beach or park. Join a dog club that does activities he can enjoy, and take him there a couple of times per week. Set goals for his training and for yourself as a trainer to keep up your own interest. Your dog would always prefer to be with you. If you are just storing your dog in the yard and ignoring him, he will be bored and desperate to find company and a more stimulating environment. Most of our favorite dog breeds were created from working dogs and possess the high energy and drives of their working ancestors. They want things to do, and they will get themselves into trouble if they feel the need to go looking for things to do.