To help prevent your dog from returning to previously soiled areas, remove urine and fecal odor with an effective commercial product. If your dog begins to eliminate in certain areas of the home, deny access to these areas by closing doors to the rooms, using baby gates, or moving furniture over soiled areas. No dog has ever been housetrained without making a mistake or two. Be prepared for the inevitable. It does not help to become frustrated and harshly discipline your dog.
Punishment is the least effective and most overused approach to housetraining.
A correction should involve nothing more than a mild, startling distraction and should be used only if you catch your dog in the act of eliminating indoors. Immediately take your dog to its elimination area outdoors to finish. A correction that occurs more than a few seconds after your dog eliminates is useless because it will not understand why it is being corrected. If the punishment is too harsh, it may learn not to eliminate in front of you, even outdoors, and you run the risk of ruining the bond with your dog. And don't even think about rubbing its nose in a mess.