It can be frustrating and worrying when a dog barks every time you leave the house. If you want to stop a dog barking when you go out it's important to understand why your dog behaves in this way. Dogs get anxious just like people do and many will suffer from something called separation anxiety. Your dog is highly intelligent and will have picked up on the subtle signs that you are leaving long before you actually leave. This means your dog's anxiety is building long before you leave. Most people have a ritual when leaving home. This can be everything from checking the doors and windows are closed to taking a shower and sprucing yourself up.
The trick when you want to stop a dog barking when you are leaving is to reduce your dog's anxiety. Number one strategy for accomplishing this is to distract your dog with something like a snack or a favorite toy. However, a regular treat won't act as a distraction for very long. Best to use something like a Kong which allows you to hide a treat inside. Your dog will have to work at getting the treat out and hopefully this will be enough to stop them getting anxious. I had a friend who used to squirt a small amount of dog-friendly peanut butter inside a suitable toy. It used to keep the dog busy for ages and gave their owner more than enough time to leave the house.
Another thing that you can do to reduce your dog's anxiety is carry out your usual leave the house routine long before you actually leave. If you do all the things you have to do in order to leave well before you actually have to leave that will give you time to sit down and drink a cup of tea or coffee. Both you and your dog can chill out for a few before you have to leave. Then when you are ready to leave give little isgn that you are about to leave. Give the dog their treat right before you are about to leave and make sure they are in an area where they won't be able to see you go out.
If you feel guilty when leaving, your dog might also be picking up on this negative emotion. Dogs are very perceptive when it comes to emotions and if you are displaying guilt or sadness your dog may notice. Always try to be positive around your dog especially before leaving the house. Remember that your dog is going to be alone in the house by themselves for a while and this is stressful enough for them without them worrying about you and your weird behavior!
If you try to remember all of the above tips and insights into your dog's behavior you are less likely to have a stressed dog. Try to see things through your dog's eyes and you (and your dog) will have a much easier time when leaving home.