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.
Just so you know, a puppy is never completely housetrained until they are 6 months old. For some breeds, even later. This means that though you may be making tremendous progress housetraining, there will be "mistakes". Sometimes for reasons you can't figure out! Don't fret about it. Stay focused on the progress you are making. Your confidence in the techniques you are using to house train your puppy will ensure your success.
Crate training is a great way to start your puppy off on the right paw. Dogs have a natural instinct to keep their den clean, so a properly sized crate, introduced gradually, will create a home base for your puppy and will keep him from having accidents when you can’t watch him. Use the crate when you’re unable to give your puppy your full attention during the day, as well as at nap time and bedtime. Selecting the right size crate is critical, and it should be big enough so that your puppy can comfortably stand up, turn around and lie down but not much bigger. If you opt for a crate that’s too large, your puppy will be able to potty in one corner and sleep comfortably in the other, defeating the purpose of crate training.
When she feels an urge, the puppy will usually let you know by whining and scratching. That’s her signal that she has to go and wants out of her little den. Now! Don’t delay because if you let your pup lose control in her crate, she’ll get the idea that it’s OK to mess up her living space. Then she’ll think nothing of leaving little packages around where you live, too.