Why Does My Dog Bark So Much
Barking is communication, not bad character. Find the trigger first, then change the pattern.

The five common reasons
Alert. The doorbell rings, someone passes the window, and the dog announces it. This is the most common kind.
Boredom. A dog left alone with nothing to do barks to fill the time. Under-exercised dogs bark more.
Attention. Barking worked before, so the dog repeats it. If barking gets you to look, talk, or open a door, the dog learns that barking pays.
Fear. Some dogs bark at strangers, other dogs, or loud sounds because they are scared, not angry. Fear barking often comes with a tucked tail, backed-up body, or hiding.
Separation. Barking that starts soon after you leave and stops when you return points to separation distress.
Watch for two days and note when the barking happens. The pattern tells you the reason, and the reason tells you the fix.
Fix the boredom first
Many barking problems shrink once the dog gets enough exercise and mental work. A sniffy walk, where the dog is allowed to stop and smell, tires a dog out more than a fast march. Puzzle feeders and chew toys help on days you cannot walk far. Why this works: a tired dog with things to do has less need to bark at nothing.
Teach quiet
Wait for a natural pause in barking, then mark it with a calm "yes" and a treat. After many repeats, add the word "quiet" just before the pause. Why this works: you are paying the dog for the silence, not for the barking. Keep sessions short, a few minutes at a time.
Reward calm, not noise

When your dog lies quietly while the mail carrier passes, or watches a stranger without barking, reward that. Most owners only react when the dog barks, which teaches the dog that barking is what gets attention. Flip it: calm behavior earns the treats.
For fear barking, go slower
Keep distance from the scary thing, and give treats while the dog notices it from far away. Over days, shorten the distance a little at a time. Why this works: the dog learns that the scary thing predicts good things, instead of danger. Never force a scared dog closer. Flooding makes fear worse.
What not to do
Do not yell. To a barking dog, your shouting sounds like you are barking along, which confirms that barking is the right response. Avoid shock and spray collars. They can increase fear-based barking and damage trust. If everyone in the house follows different rules, the dog gets confused, so agree on one approach.
When to get help
If barking starts suddenly in an older dog, or comes with other changes such as eating less, sleeping more, or moving stiffly, see a veterinarian first. Pain and illness can change behavior, and this guide cannot diagnose that. For persistent separation distress or fear, a certified trainer or veterinary behaviorist can help more than a general guide.
Related: How to Stop a Dog Pulling on the Leash and How to Socialize a Puppy.
Not veterinary advice: This guide is general information for healthy dogs. If your dog is sick, in pain, or suddenly behaves very differently, see a veterinarian.