Whenever you go to open the door, your dog probably is right there, calculating his moves so he can bolt out.
While such behavior is not necessarily harmful, it can be annoying, and even dangerous for your dog, if he runs out on a busy street, etc.
Teach your dog to stop running out the door
Start with your pup on leash
Place an elevated platform near your door, maybe an ottoman. (You can skip the elevated platform but it helps in faster progress)
Have your dog jump onto the platform and reward them for doing so. Practice this repeatedly.
Open your door just a couple of inches and then close it. Reward your dog if he stats. If they jump down, wait for them to calm down, and repeat the exercise until he stays.
Open your door again but this time to maybe 4 inches. The goal is to have your dog keep sitting. If they jump off, simply reset them and try again.
Continue to practice this and gradually open the door more and more.
The end goal is to have the door all the way open, but your dog staying. This will take multiple training sessions.
Next, let your dog know of a release word. This would tell them when they can get up and go through the door with you.
Important Notes
When teaching this behavior:
Make sure you have a gate outside the door so your dog can’t really escape. You can also have your dog on a leash.
A stand or something elevated can help decrease your fur baby’s desire to run through the door
Eventually, you can remove the platform.
PRO TIP: Even out of a training session, ask your dog to do a sit-stay whenever they walk through the door with you. You can also do a sit-look at me.
Remember, patience is the key. Teaching your dog anything takes time, effort, and patience. If you are patient and gentle with your dog, it’s easier for them to learn.