Many owners have problems with their dog or dogs barking incessantly throughout the day whenever anyone goes past the window or walks past the house or when the mailman delivers the mail.
Dogs that bark are demonstrating territorial behavior, which is a warning for the intruder to keep away. This is an area where dogs either look for leadership or assert their leadership. Pack animals are territorial creatures. Your dog, being a pack animal, instinctively understands territorial behavior. This is why many dogs react so aggressively when someone passes by or enters your home. Your dog considers your home as his den. A pack leader's role is to protect the pack at all costs and a dog that has assumed this position takes these responsibilities very seriously.
When people visit, dogs often become very excitable and go running to the door barking while the owner is trying to keep hold of the collar and open the door at the same time. A dog that goes to the door and is involved in deciding who is allowed into the den has been given the role of pack leader by the humans in the home. If the person at the door comes in, even though the dog has said "no", then the dog will resort to biting to affirm his decision.
With small dogs, owners will often lift the dog in their arms to contain him. Lifting a small dog up in your arms gives the dog height. To a dog, the one who is highest (not tallest, just on the highest ground) is the dominant one in the pack. You can see this often at a dog park where in greeting a new dog, one dog will attempt to put his head on the shoulders of the other dog, thereby saying "I'm higher ranked in this pack then you are".
It is not your dog's role to answer the door. A good way of reinforcing this message is for you to claim the door as yours, putting down an imaginary boundary of where he is allowed to go and no farther. The moment your dog goes to move forward you must block him by using body language. Stand up as straight as you can, put your hands on your hips (makes you look bigger to your dog), take a step toward him and say "hey" firmly and confidently. It doesn't have to be loud, there is no need to yell. You can use whatever sound you wish, but I suggest that you don't use "no" as you've probably used it so many times without backing it up that the dog thinks it's just meaningless barking.
Another method is desensitizing the dog to people coming to the door. Put your dog on the lead and have someone knock on the door. The moment your dog lunges forward or barks, take him calmly and assertively in the opposite direction while the other person opens the door. This is a very effective way of demoting your dog and alleviating him of the stress of being in charge. Wait until your dog is calm before having your helper knock on the door again and you will soon notice that with every repeated knock, your dog becomes more and more relaxed. When he realizes it is not his decision to allow people into the home, he will look to you to see what you want him to do when someone knocks.
It is very important that whoever comes into the house pays absolutely NO attention to the dog until he is totally calm and settled somewhere in the house. It's even more important for YOU to remain calm and assertive throughout the retraining or desensitization process. Your dog will sense your emotions and attitude and respond accordingly. You being calm, reassures your dog that there is nothing wrong. If you shout at your dog or say something in an anxious tone, you will be confirming to the dog that there is potential danger.
Once you have achieved the required response, other than needing an occasional reminder, your dog will be unaffected when someone comes to the door.