This is a clear-cut situation that you will have little trouble with once you understand it. The reasoning behind it gets into a rather sophisticated area of dog knowledge.
If, when you come home, your dog runs to greet you at the door, tail wagging, ears down or back, hind leg tentatively lifting, observe. He may urinate while exposing his belly to you. This is not an unhousebroken dog. Such behavior is a submissive display and urinating, in this case, is part of the language of submission- a white flag, so to speak. You should no more punish your dog than you would shoot a surrendering soldier.
Actually, your dog is just overreacting a little. Just coming to you, panting, wagging his tail, and wiggling would be all the greeting you’d want. Your dog, however, feels the need to reassure you that you are the top dog. The dog may be young, or a mild type, or you may be very assertive, large, gruff, powerful, or masterful in your stance. Whatever, it is very important to determine what causes your dog to urinate submissively. Once this is known, it can be dealt with.
EXAMPLE: Your dog urinates when it is excited, you come home, neighbors or friends visit, you get up in the morning and greet the dog, etc. The best way to deal with this problem is to ignore the dog. Don’t talk to it with baby talk or in a high-pitched voice. Ie: “How’s mommy’s (or daddy’s) wittle baby boy (or girl) this morning? Mommy (or daddy) missed him (or her) so much today. Was he (or she) a good puppy today?” Same when neighbors or friends visit. Tell them to ignore the dog and just walk past. This is not cruel. We are simply trying not to put the dog into a position where he (or she) feels that it is necessary for him or her to be submissive. After you are home for a while or after your friends or neighbors have been in the house for 5-10 minutes, it is permissible to greet the dog, but again, be low-key. Talk in a normal voice and don’t get the dog too excited.
EXAMPLE: Every time you go to put your dog’s collar on or loom over it for whatever reason, it urinates. The best way to deal with this problem is to take the dog outside to put on its collar. If this is not possible, you can try stooping down, offering the dog a treat, and calling him or her to you. When the dog arrives, still crouched down, pet the dog, praise and give him/her the treat. You can then attempt to put on the collar.
EXAMPLE: Every time I go to discipline my dog or call him/her to me, she urinates. This is actually your dog’s way of saying he’s very sorry to make you so angry. Unfortunately, it usually just makes us (being human) angrier. Discipline-wise, try using shaker cans instead of going to your dog to discipline him. In the matter of calling your dog to you, try the example above for putting on the collar. Never, under any circumstances should you ever call your dog to you for punishment. Go and get your dog.
Never punish submissive urination. All this will do is lead to more submissive urination. Submissive urination is the dog’s way of acknowledging you as the pack leader- the boss. It is the most submissive thing that he/she can do. If you then yell or punish the dog for this, he/she will become very confused and will urinate more. This is not the way to deal with the problem. Just quietly clean up the few drops of urine and try some of the suggestions above. Some dogs will outgrow this problem, some will never outgrow it and you will have to continue to deal with it for the life of the dog. The best way to deal with it is to not put your dog into a position where he/she feels that submissive urination is the only way for him/her to please you. Find alternatives to whatever you find is causing the behavior. This can be a frustrating problem. Stick with it and you may find you can control it, if not cure it.