Dog urine has an unpleasant smell because of its enzyme, hormone and ammonia composition. Over time, the odor of the urine gets worse and is difficult to remove, especially from carpets. To prevent your dog from urinating on carpets while you train it to urinate outdoors, you may use certain commercial repellents or home remedies. It's important to clean the areas well before you apply any solutions especially if the dog has urinated on the carpets, because dogs tend to return to places that have a urine odor.
The commercial repellents are available in the form of sprays and contain different chemicals or natural compounds such as cayenne pepper that dogs don't like and avoid. If the dog has already soiled the carpet, clean it using an enzymatic cleaner or vinegar and allow the carpets to dry. Spray the repellents generously and reapply as indicated on the label of the product you use.
White vinegar is not only an effective carpet cleaner and urine odor remover, but it also acts as a repellant. Canines don't like the smell of the acetic acid, which makes up vinegar and are likely to avoid the areas that are sprayed with this solution. Prepare a solution of white vinegar and water in a 1-to-1 concentration and spray it over your carpets and the areas where your dog likes to urinate.
Mix lemon juice -- commercial or freshly squeezed -- with water and sprinkle it on your carpets. This smell is pleasant for people, but will keep your dog at bay. The citric acid is also effective if you want to clean and remove urine odor from carpets.
Isopropyl alcohol, better known as rubbing alcohol, is an effective disinfectant and has antibacterial properties, and its powerful scent is not agreeable for canines. Dilute rubbing alcohol using one part alcohol and one part water and spray it on your carpets. Reapply the mixture weekly or after each cleaning of the carpets.
Ammonia has a powerful smell dogs dislike. However, the smell of ammonia is similar to the dog urine smell you want to cover, so you might want to use this solution if all others fail. Dilute the ammonia with water and spray it over the carpets.