A few simple things can make house training your dog much easier.
Using a crate will help in a number of ways. Confined to a small area, especially one where they eat and sleep, dogs will avoid eliminating for longer periods of time. It is a good practice to confine the dog to a small area like a crate when he or she is not being actively watched.
Keeping to a regular feeding schedule will keep the dog regular. Take the dog out the same door to a specific area on a consistent schedule. This helps the dog build a preference for where he or she eliminates.
Take the dog out on a leash for five to ten minutes. Use a word or phrase such as empty or hurry. If the dog empties then take a short walk or play with them outside. If the dog has not emptied them return them to the crate and try again later. By rewarding the dog for eliminating quickly the dog does not learn to hold out to get a longer walk.
Reward the dog with praise, food and/or play as soon as they eliminate.
Correct the dog swiftly and meaningfully when they are caught in the act indoors. Take them outside firmly and begin to praise immediately. This will make clear the difference between wrong and right.
Do not punish the dog after the fact. No, "rubbing their nose in it".
Be consistent. Dogs need a routine.
Be patient. House training progress is often slow.