The guest has barely taken off their coat and your dog is already trying to climb their leg. The awkwardness is real, but the behavior doesn't tell you that your dog is "dominant." Dogs may mount when excited, stressed, or caught up in play. Occasionally, physical discomfort plays a part too.
Start by taking the pressure off the greeting. Before you open the door, put your dog behind a gate or in a comfortable room with something safe to do. Let the guest come in and settle. There is no rule that your dog has to meet visitors at the threshold. If they come out later, give them space and watch whether they can stay loose and responsive.
Catch the moment before it happens
Notice the lead-up. Some dogs pace, pant, whine, jump, or become harder to interrupt just before they mount. When you see that shift, invite your dog away and reward a simple behavior they already know, such as going to a mat or finding a few treats scattered on the floor. If they still rush back, end the greeting for now and let them decompress away from the guest. Don't wait for repeated mounting and then scold them in the middle of it.
Practice the mat cue when no guests are present. Reward your dog for choosing it, first in a quiet room, then with a household member walking through the door. A willing helper can arrive for a short, planned practice, real visitors should not have to become part of an improvised training session.
Humping another dog is its own situation. The other dog may not welcome it even if yours seems playful. Interrupt early and give both dogs a break. Never leave them to "sort it out" if one is trying to leave or becoming tense.
If mounting is frequent, new, difficult to interrupt, or comes with licking, urinary changes, aggression, or distress, ask your veterinarian to check for a medical cause. A qualified, reward-based behavior professional can then help with a plan that fits the reason it happens. The goal isn't a perfect show of manners at the front door. It is a visit in which everyone, including your dog, can relax. If a health cause has been checked, the visitor and doorway guide offers a broader arrival routine, prevent unwanted contact while you work on it
Sources: PDSA: Humping Behaviour in Dogs. Dogs Trust: How to understand your dog's body language.