A puddle during greetings does not tell you that your dog has forgotten where to toilet. Some dogs urinate when excited, worried, or torn between approaching and retreating. Watch the whole greeting, not just the floor. A loose, wiggly approach looks different from crouching, avoiding eye contact or trying to leave.
Check health before changing the greeting
If this is new, frequent outside greetings too, or paired with straining, increased thirst or other changes, call your vet. Do not punish the dog or use a sharper voice after an accident. That can make a worried greeting harder. Clean the area and make the next arrival calmer.
Offer a toilet opportunity before the expected visitor. Ask guests to enter without reaching over, staring at or calling the dog. Give your dog a comfortable place away from the door and let them choose whether to approach after everyone has settled. Keep greetings short and low-key. If the dog looks uneasy, do not insist on a hello.
Once you know the dog is well and comfortable, practise a simple arrival routine between real visits. Reward calm choices away from the doorway. The visitor and doorway guide has more on planning arrivals, but it does not replace the vet check when urination changes suddenly.
Today, tell the next guest not to greet the dog at the door and set up a quiet place where the dog can stay. A calmer arrival is more useful than trying to stop a puddle after it starts.
Sources: VCA on excitement, fear and conflict urination. Dogs Trust on toileting changes and veterinary checks.