Dogs pee on plants for a variety of reasons, which means different solutions are needed based on the specific problem. Before you try any home or commercial remedies to keep dogs from peeing on plants, you might want to call your vet to determine the cause and the solution that's appropriate for this particular behavior.
Why dogs pee on plants
In addition to needing to relieve themselves, dogs often pee in specific places to mark their territory. This is more true of male dogs and happens more with dogs that haven't been spayed or neutered. Scent marking might be more likely to occur outdoors if there are other dogs in the neighborhood, especially if another dog has urinated in your dog's yard. Your dog will pee on the other dog's urine to reclaim its turf. If a new dog is introduced to a home (with or without another dog or dogs), this might occur.
Video of the Day
If your dog has been left indoors for too long and needs to go, he will look for a familiar place to pee, which is something that reminds him of the outdoors and nature. If it's a large potted plant, your dog will know that the dirt will absorb his pee and not cause a mess.
Talk to your vet about your dog's plant-peeing habit to determine whether it needs to be addressed with a visit to your vet (it might be a health issue) or a visit to a professional trainer, who can identify if your dog is stressed or suffering from another emotional issue that needs to be worked out.
Dog urine kills plants
If you have live houseplants or your outdoor shrubs, flowers, or prized lawn are a target for your dog, you should be aware that the nitrogen, salt, and acid in dog urine can kill plants and lawn areas. For this reason, you'll need to keep your pet away from certain areas of your yard. If you feel the problem might continue for years, you might want to plant perennials that can handle dog urine.
How to stop dogs from peeing on your plants
It's OK to let your dog know when it's not OK to pee somewhere — that just should not be the basis of your training. One way to prevent your dog from peeing in a certain outdoor area is to designate a specific area of your yard for peeing. Bring your pet to the area to relieve herself and then reward her with praise and treats. You can leave some type of physical object in this area of the yard so she knows it's hers.
Use positive reinforcement ("good dog!") rather than negative reinforcement ("no, bad dog!") when trying any kind of behavior training. Just because you tell your dog what not to do doesn't mean you're telling her what to do. Repeat your training multiple times until you walk to the area and your dog pees without encouragement. At some point, your unleashed dog will start heading to her yard pee zone naturally. Remember to clean up feces or the area will become unattractive to your dog over time.
Other ways to keep dogs from peeing on plants
Another way to keep dogs away from your plants is to lay down chili powder or cayenne pepper in those areas. When you're training your dog to pee in his designated area, first bring him to the peppered areas, where he'll start to smell the unpleasant spices. Next, move him to his new safe zone and he'll begin to prefer it over the unpleasant area.
You can also scent indoor plants with spices, ammonia, vinegar, hot sauce, coffee grounds, orange peels, or ground mustard. Be careful that you don't use so much that the dog might get sick if he eats it. Try placing it around the plant and then covering it with a light layer of mulch.
You can also look for motion-activated animal deterrents that give a whistle or spray a short stream of water to keep dogs (and other critters) away from prized plants.
A note about cleaning indoors
If your dog has peed on one of your indoor plants, check the area to see if any urine, including spray, went outside of the planter. If so, clean the area with a cleaner specifically made to remediate dog urine, not just clean it.
These cleaners don't just clean carpets; they get into the padding and bottom floor surface to kill all of the bacteria in the urine. Removing urine from the surface of any type of flooring doesn't necessarily kill it, and it can cause health problems for pets and kids who play on the floor.