Set them up before the door opens
Set up a gate or a quiet room with water and a comfortable resting spot before anyone opens the door. Tell visitors to give your dog space. Your dog can stay apart for the whole visit.
Let greetings be optional
If your dog chooses to approach with a loose body, an adult can quietly reward four paws on the floor. Ask guests to wait. If your dog backs away, stiffens or barks, give them space behind the gate again.
Teach a doorbell routine
Practise ringing the bell or knocking, then rewarding your dog for going to their bed. Start with no visitors at all, and build up to real arrivals.
Barking at passers-by
Dogs who bark at the window or fence are often guarding their patch. Block the view with frosted film or move their resting spot, and reward them for looking back at you. Shouting can sound like barking along. If your dog seems worried by visitors rather than excited, get help from a reward-based professional.