2.) Use a crate or a small area, such as a kitchen or bathroom, to confine your dog when he can't be supervised. Dogs do not want to defecate where they must remain. A crate is a useful training tool, but don't use it to imprison your dog for a long period of time. This is psychologically damaging and inhumane.
3.) Make sure to use the same door and watch for signs that he has to go out. Once outside, take him to his favorite spot and repeat a command like "Hurry up!" while you wait. Repeat the command every time he goes and give him lots of praise when he finishes.
4.) Until your dog is housebroken, it is important to setup a feeding, watering and walking schedule and be consistent. For example, take him out first thing in the morning. After he eats and drinks, take him for a walk immediately. When he relieves himself, give him lots of praise. Consult your veterinarian for your dog's food and water needs.
5.) Use an odor neutralizer, which can be bought from a pet store, to clean up messes inside. Dogs tend to seek an area where they or another dog have already eliminated. Ordinary household cleansers mask the odors that only dogs can smell.
6.) Never punish your dog during housebreaking and use only positive reinforcements!