Two rules of housebreaking to remember are 1. Confinement so your dog cannot go to the bathroom in the wrong places and 2. Constant or regular access to the right place to go to the bathroom.
Confinement means that until your dog is housebroken, he is never allowed to walk freely around the house. Every hour of every day; unless you are sitting with your dog, playing with him, walking him, feeding him,or interacting with him. Because if he is loose and you take your eyes off him for just a few moments, he can go to the bathroom on your floor, and the bad habit is begun.
Access to the right place means you take your dog outside, or he lets himself outside through a doggy door. Or it means you provide him with newspapers or a litter box indoors. He must have somewhere to go on a regular basis.