There are many commercial products that say they will keep pets off your carpet, but keep in mind that not all of them work (as you may have found) and they can be expensive. However, if you do use them, remember that a dog or cat will keep urinating where he has already gone if he can still smell the urine. So before you use any product to keep pets off your carpet, you will have to get a black light and find out where all of the old urine stains are and treat them with a vinegar and water solution to neutralize the smell.
A black light can be found at most hardware or pet stores. Use the light at night with the lights off and mark the stains with masking tape. Then take one tablespoon of vinegar to one cup of water and thoroughly dab it on the old urine stains. Then, take one tablespoon of clear dish detergent mixed with one quart of warm water and go over the stains. Finally, rinse with some cool water and blot dry with clean, white paper towels. Be sure to test these solutions on in inconspicuous part of the carpet before using them and make sure to keep the pets away from the area you are treating until they are completely dry. Otherwise your pets will immediately go out of their way to remark the places you have cleaned.
You may want to do this room by room as this is an arduous process, but unless you lay the neutral groundwork for the home remedies or commercial sprays you want to try, they won’t work. After this neutralizing , most sprays will work to keep pets of off carpets if you spray just a little bit every once in a while or when you see a pet wandering too close to new carpet in the living room.
Diluted homemade sprays that work include vinegar, rubbing alcohol, ammonia, and lemon. Dilute any of these with water and spray them lightly over the carpets, mainly concentrating on the doorway. Depending on your pet, one may work better than the other. You can also sprinkle a little cayenne pepper in the doorways when you aren’t home, which will also keep pets at bay.
Cats are a little different in the fact that since their urine smells like ammonia, they don’t mind it. However, the lemon or anything citrus works to keep a cat out of a room because they don’t like that at all. Again, it won’t work if the cat has already marked its territory, so you will have to neutralize the room first. Also, lemon or citrus carpet sprays work to deter a cat form entering room and are also pleasant for humans.
If you can take the smell, cats don’t like mothballs either. You can take some mothballs and put them in a clean jelly jar. Poke holes in the lid and then set the jar at the doorway to any room where you don’t want the cat to go.