Instructions
Choose a verbal command to teach your dog to bark. For example, use the word "speak." Everyone in the family must use the same word in the same tone of voice every time they want the dog to start barking.
Train your dog in a quiet setting. Have someone knock on the door once and then go away -- that should make your dog bark. When your dog barks, say your command word and reward him with a treat.
Practice the command drill in increasingly distracting situations. For example, knocking twice, knocking multiple times, opening the door and entering the house. Repetition is key.
Teach your dog a command to stop barking so he can distinguish between when you want him to bark and when you don't. Choose a word such as "quiet" or "enough" and reward the dog with a treat when he stops barking.
How to Get Your Dog to Start Barking at People at the Front Door
Barking is a form of communication that comes naturally to dogs. Dogs communicate with body language, ear position, tail position and with their voice by barking. A dog that barks at people at the front door alerts everyone about a guest or intruder. Usually people want to train their dog to stop, rather than to start, barking. Either way, training the dog is the same. The most important elements of this training are calmness, consistency and patience.