You can train your dog not to run away.
Dogs are naturally curious animals, and when they have the opportunity to go exploring, they often don’t pass it up. If your dog tends to run away, you might be frustrated by the lack of control you have over your pet. Preventative measures, such as electric fencing, are often effective against this problem, but a better solution is to train your dog not to run away.
Limit the amount of time your dog spends in the yard. Rather than letting him play for hours alone in a fenced area, take him for walks, and let him outside only to toilet. This tells him that the yard is not a playground, but a place to do his business.
Call your dog to the door as soon as she has finished her toilet.
Practice opening the gate to your yard repeatedly and commanding your dog to stay within the boundaries of the yard. This will teach him that an open gate isn’t an invitation to run free. Do this several times a week until he doesn’t try to escape.
Repeat Step 3 with the front door of your home. Many dogs will try to slip between their owners’ legs as soon as the door opens. Train your dog that she shouldn’t leave the house unless instructed.
Instill obedience to important commands, such as “sit” and “stay.” Practice those commands both inside the house and out.
Reward your dog for staying put when gates and front doors are open, and when he stays by your side when he’s not on a leash out of doors.