One thing that I have always been very proud of as a dog owner is that all of the dogs I've ever owned learned to relieve themselves in the right places within a couple of weeks of moving into my home. Training your puppy or dog to pee where you want him to should be the first "trick" you try to teach him when it's been introduced into your home. However, be warned—this process takes a lot of time, energy and patience, some dogs also learn at slower rates than others. But housebreaking is certainly the first thing I always devote myself to, because once that issue is resolved, you can fully enjoy the company of your pet without worrying about finding nasty puddles to clean up around the house.
Here are some ways to housebreak your dog that have always worked for me:
1. Go insane with praise
The most important thing that every pet owner should know is that positive reinforcement works exponentially better than punishment after bad behavior, which hardly — if ever — works at all. This means you should NEVER hit or strike their dog for bad behavior. Dogs don't speak your language, they don't understand what the words coming out of your mouth mean, therefore they will not associate your violence with the urine they left on the living room rug an hour ago. Imagine a giant stomping over to you, screaming in a language you don't understand and punching you in the gut for no reason. Now imagine this happening all the time because you don't know what you're doing that is making the giant angry. This is how your pet sees you when you lash out over bad behavior.
Instead, what you should do is go absolutely insane with praise and treats when your dog does his business in the right place. I generally act very excited, jumping up and down while rewarding my dogs with healthy snacks, just to make sure he knows that peeing in the correct location was the most amazing thing he could have ever done. Over time, your dog will remember the rewards of doing his business in certain areas, and try to repeat this good behavior to acquire more praise from you. However, if your dog pees in the wrong place, just try to keep your temper and clean it up. Do not scold unless you actually caught your dog in the act; he will have no idea what you're talking even about if its only been a few minutes since he peed in your bedroom.
2. Fence in his peeing/pooping area
This point may not be so relevant to those who only allow their dogs to relieve themselves outdoors. However, if you are a dog owner who allows your dog to relieve himself in certain areas of the house, or on pee pads, then make sure you find a way to fence in these areas while training your dog to do his business. The barricade is to make sure your dog doesn't wander off into any other parts of the house and mistake its peeing area to be outside the space you have marked. However, since dogs are reluctant to relieve themselves in spaces they consider their own, you must stand by and immediately remove your pet from the designated space once he has successfully relieved himself, and praise him for his good work.
3. Constantly move your dog to his peeing area
This part of the training process can be exhausting, especially when you need to do it in the middle of the night, but it is the most effective way to ensure your dog learns quickly where to go when he needs to relieve himself. You should move your dog to the designated peeing area any time he looks anxious or restless, is stirring in his sleep, and about 10 minutes after every meal or large drink of water. While I was training my dog, I always left him in the peeing space for about 10-15 minutes, and once he relieved himself I would remove him from the space and praise him. Don't worry if you get it wrong sometimes though, 15 minutes may go by and nothing will happen. In which case you can remove the dog from the peeing area, but keep a watchful eye. The idea is to condition your dog to know where to go every time he needs to relieve himself.
When I trained my dog using this method, he eventually understood where to go if he needed to relieve himself inside the house, and started going to the correct location without needing me to bring him there. That is when you know you can probably remove the fence from around the peeing area, and gradually phase out the over-the-top praise and treats. I do occasionally still commend my dog for peeing in the right place, just so he knows that I still appreciate it.
4. Clean up accidents as thoroughly as possible
Dogs can smell their scent wherever they have relieved themselves, and tend to return to those same places to pee again. This means if your dog happens to do its business in the wrong place, try to clean it up as spotlessly as possible. This includes multiple washes with soap and water, a thorough wipe down or cleanse with disinfectant, then use some kind of fragrant pet-safe spray to mask any lingering odors. Obviously, this is much harder to accomplish with carpets and rugs versus tiled or wooden floors, so if you're still trying to housebreak your dog, make sure you keep it away from any areas of the house with fabric on the floor.
In my experience, it's much easier to housebreak a puppy versus a grown dog who has already established certain habits of relieving himself. This is why you should remember to be much more patient with grown dogs, and perhaps try to compromise with whatever peeing regimen he is already accustomed to.