Be persistent! Make sure the puppy doesn't get the opportunity to pee and poop by using a leash indoors or confining him to a crate when you're out. Depending on the puppies age, pop him outside every 20 - 30 minutes, so there's a greater chance of him toileting outside (by accident at first.) In addition, get rid of any scent markers he's left by peeing or pooping indoors, as these will draw him back to the same spot. This means cleaning the area daily, for 2- 3 weeks after he last pooped there to fully get rid of any lingering odor that the dog can detect.
The most important part of training your dog is teaching her that it pays to do things you like. But your dog also needs to learn that it doesn’t pay to do things you don’t like. Fortunately, discouraging unwanted behavior doesn’t have to involve pain or intimidation. You just need to make sure that behavior you dislike doesn’t get rewarded. Most of the time, dog motivations aren’t mysterious. They simply do what works! Dogs jump up on people, for example, because people pay attention to them as a result. They can learn not to jump up if we ignore them when they jump up instead. It can be as simple as turning away or staring at the sky when your dog jumps up to greet or play with you. As soon as she sits, you can give her the attention she craves. If you stick to this plan, your dog will learn two things at once. Doing something you like (sitting) reliably works to earn what she wants (attention), and doing things you don’t like (jumping up) always results in the loss of what she wants.
Work on only one part of a skill at a time Many of the skills we want our dogs to learn are complex. For instance, if you want to train a solid sit-stay, you’ll need to work on teaching your dog that she should stay in a sitting position until you release her (duration), she should stay while you move away from her (distance), and she should stay while distracting things are going on around her (distraction). You’ll probably both get frustrated if you try to teach her all of these things at the same time. Instead, start with just one part of the skill and, when your dog has mastered that, add another part. For example, you can work on duration first. When your dog can sit-stay for a few minutes in a quiet place with no distractions while you stand right next to her, start training her to stay while you move away from her. While you focus on that new part of the skill, go back to asking your dog to stay for just a few seconds again. When your dog can stay while you move around the room, slowly build up the duration of the stay again. Then you can add the next part-training in a more distracting environment. Again, when you make the skill harder by adding distraction, make the other parts-duration and distance-easier for a little while. If you work on all the parts of a complex skill separately before putting them together, you’ll set your dog up to succeed.
Every time your dog pees or poops outside it needs to be celebrated. Give them baby talk or a treat, jump up & down, pat their little heads & remind them of how brilliant that decision was. Yes it might look silly, but your pup needs to know he’s done the best thing ever. When you consistently praise your puppy for going potty outside they’ll start to understand that it’s the correct decision, and one that leads to super fun happy time. more
The process is the exactly same for older dogs as it is for puppies; prevent accidents from happening by using baby gates and a crate if possible, create a predictable schedule, learn to recognize your dog’s potty signals, accompany your dog outside and immediately reward for all outdoor elimination, properly clean any accidents and supervise your dog until you’re sure that he understands the rules. dog training collar
If you can teach your dog polite manners without hurting or frightening her, why not do it? Rather than punishing her for all the things you don’t want her to do, concentrate on teaching your dog what you do want her to do. When your dog does something you like, convince her to do it again by rewarding her with something she loves. You’ll get the job done without damaging the relationship between you and your best friend.
It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting. Can dog aggression be trained out?