Why do dogs bark? The short answer is - to get our attention. Whether it's to let us know there's someone at the door or an attempt to get you to play, barking works because it's difficult to ignore and it usually gets a reaction of some kind. Domestic dogs also communicate with each other by barking, as an invitation to play or as a warning to stay away. The barking alone doesn't necessarily convey the dog's mood, the rest of his body language is important too, showing whether he's excited and playful or threatened and afraid. Wild relatives of the dog, such as wolves, coyotes and dingoes don't bark in the way domestic dogs do. They sometimes make a barking type of sound but are more likely to howl to communicate with each other from a distance. It is thought that over generations, humans have bred a good bark into domestic dogs, particularly to create effective guard dogs.
Our dogs bark to let us know about danger. When there's real danger eg an intruder, that's exactly what we would want our dog to do - to let us know and to scare off the intruder. However, when there is no danger, the barking is just annoying. But just because we aren't aware of what the dog is barking at, it doesn't mean they haven't seen, heard or smelled something that they're not sure about. Don't underestimate that sense of hearing and sense of smell. And then, how is a dog supposed to know what's a threat and what isn't? We know that it's just the postman at the door, or the neighbour going to the wheelie bin, or a plastic bag blowing by and nothing to worry about - but dogs don't. So if in doubt, they bark in order to rally the troops to deal with this unknown entity together, as a team. In this situation, the worst thing to do is ignore the dog - he's trying to tell you something so he's going to keep barking until a) you take notice or b) the danger goes away. When the latter happens, this proves to the dog that he was right to bark and then, all by himself, he's dealt with the problem and made it go away. Therefore, he'll do the same thing next time. The postman is a classic example of this. The second worst thing to do when your dog barks at danger (whether real or not) is to react angrily, telling the dog to "SHUT UP" (or something similar). Now your dog thinks you're also barking, proving that there was something to be bothered about after all and now, because of the stress in your voice, there's even more reason to keep barking and make this danger go away. Problem is, no-one's actually doing anything about the original threat, everyone's just barking at it.So the thing to do when your dog barks at something which he believes is potentially dangerous (but you know it's not) is to react with a calm voice: "thank you, good boy". And you can do this from a distance eg if you're in the house and the dog is in the garden. You're acknowledging that he's seen/heard/smelled something but also affirming that it's nothing to worry about and you don't need to do anything more about it. But if he doesn't believe you and continues to bark, go a bit closer to where he is or what he's barking at, repeat the "thank you", confirming that you've definitely checked it out and you're sure it's OK. If that still doesn't convince him, simply remove him from the area, without speaking this time: the final gesture that you don't want any more barking. The same technique can be used when your dog barks at potential prey eg birds in the garden. You acknowledge that he's seen something potentially tasty (rather than dangerous), but you let him know you're not interested.Be careful not to go too over the top with your praise and acknowledgement, just keep it simple. Otherwise you will teach your dog that barking is a great way to get your attention, some fuss or a treat. And then you create a different problem.
A dog will quickly learn what gets attention. And attention means any eye contact, talking or touching, not just full-on fussing, playing, or a food treat. So, looking your dog in the face and telling him to "shut up" when he's barking is giving him attention. If you think your dog is barking just to get something from you, (and not because there's a possible danger that you're not aware of), then you can completely ignore him - even walking away or removing him to another room/area if necessary. If your dog barks when he needs to go outside to toilet, there's no need for extra attention here - just open the door without looking at him or speaking to him. If he really needs to go out, he'll go. Maybe you've noticed that he doesn't actually need to go out every time he asks but if you talk to him as you open the door and have a discussion about whether he wants to go out or not, that's the attention he's looking for!
Gadgets to prevent barking are really unfair on dogs. When he's doing what comes naturally for what he believes is a good reason, to be punished by something which inflicts pain or discomfort is very confusing. Gadgets such as collars which spray, emit ultrasound or deliver an electric shock only serve to give a quick fix and the misguided belief that the problem is solved. Take the gadget away and you're either back where you started or your dog is completely traumatised. Far better to invest time and effort in getting to the root cause of the problem and fixing it permanently in a kind way, with professional help if necessary - preferably a trainer or behaviourist who doesn't rely on gadgets. If you have a dog that barks continuously when alone, that may be a separation issue and again needs expert help.
When your dog barks, you need to quickly assess whether it's because there's a genuinely perceived threat somewhere or just to get your attention for fun. Where's he looking? Towards a sight, sound or smell, or directly at you? What's the rest of his body language saying? Then you either calmly acknowledge the alert or ignore the attention-seeking.We shouldn't be trying to stop our dogs barking completely, but should be able to control it when it starts. One day, in the event of a real emergency we may be very glad of it.