Barking is not only a problem while owners are out - dogs bark for all sorts of reasons such as frustration, excitement and fear or when they are seeking attention or trying to be threatening.
How you tackle problem barking depends to a large extent on the cause. In some cases there may be a quite simple and obvious solution but with others it may be more complicated. In such instances it may take time, effort and much patience before you begin to make progress and you may also need the help of a behavioural trainer. Remember to try to work out why your dog is barking so you can address the cause and not just the symptom. Reward him for being quiet and never punish him for barking.
Dogs often bark when they want something, whether it's a toy, game, some food, or a cuddle, and this is often a behaviour learned in puppyhood. This type of barking can be very insistent and difficult to ignore but ignore it you must since, from a dog's point of view, any attention is better than none. Make your dog's barking counter-productive by turning your back on him or leaving the room until he's quiet. When he does quieten down you can reward him with a pat and word of praise. Teaching a "Hush" command may also work, as can asking your dog to do something - this will interrupt the barking and show him he has to earn your attention rather than demand it.
Visual stimuli for your dog
Some dogs are reactive towards people or other dogs walking past 'their' house. Drawing curtains when you're not around and using a "Hush" command when you are should help. If your dog tends to bark at passers-by through the garden gate or fence create a screen of some kind or confine him to a different area. There may well be other issues, such as fear, territorial feelings or lack of socialization, at work which will need to be worked on to resolve the barking problem successfully.
Training check for your dog
If your dog barks a lot during training sessions try breaking down the actions you want him to learn into a series of steps you can progress along in easy stages. Check your verbal and physical cues are consistent and clear and, if necessary, go back to the last step he understood. Also, make sure he is physically able to perform the task you are asking him to do.
Some noises may startle your dog into barking and, again, teaching and using a "Hush" command can help. Where a particular sound consistently triggers barking you could try desensitizing your dog to the noise by using recordings of it in the same way as when helping a dog to overcome a fear of fireworks and thunder.
Alarm barking alerting you to a stranger calling at the door isn't necessarily something you want to discourage but you should certainly be able to control the duration by teaching a "Hush" command.
If this is the cause of the barking your dog may exhibit other signs of distress too, such as panting, pacing and destructive behaviour. You'll need to spend time working on increasing your dog's ability to cope without you - maybe by putting him in an adjoining room using a door gate so he can still see you initially. You could also change your habits when you leave the house. Try acting as if you're preparing to leave the house but don't actually go out as this may also help to reduce your dog's anxiety levels. If you're unsure about devising a programme for reducing separation anxiety contact a behavioural trainer for advice.
Your dog may give short, sharp barks at times when he is keyed up, such as when you arrive home, when playing an exciting game, or perhaps on seeing another dog he wants to play with. If this happens when you are playing a game, put the toy away until your dog is calm. If he's spotted another dog, walk away with him in another direction. When you arrive home don't greet your dog until he is quiet.
Many dogs are both under-exercised and lacking in mental stimulation. Increasing the amount and quality of exercise you give your dog may mean he'll be happy to snooze while you're out rather than bark. When you do go out, provide him with activity toys.
Dos and don'ts
The causes of barking are multiple - this is by no means an exhaustive list, just a few common causes. If you're having trouble working out the cause or finding a successful solution seek expert advice as the longer a behaviour continues, the more established it becomes, taking longer and being more difficult to remedy.
Stay calm, even though the noise makes you feel like screaming yourself. Reward quiet behaviour, keep obedience training up to scratch, as this can make it easier to resolve some barking issues. Seek help if you're having trouble remedying the problem.
Shout yourself - your dog will simply think you are joining in and bark even more. Be inconsistent - choose a single-word command such as "Hush", "Quiet" or "Enough" and make sure you always use it when you want your dog to stop barking, speaking in a low-pitched tone.