If you have cats at home, they probably use their litter box the majority of the time, but might occasionally have accidents. It is essential that you tend to these stains as soon as possible, not just due to the smell and uncleanliness for your home, but because the scent might encourage the cats to keep peeing on the carpet.
Try to Blot Up Wet Stains
When you notice that your cat has had an accident on the carpet or rugs, try to blot it up as soon as possible. If you can catch the stain when it is still wet, you have a good chance at removing it completely and avoiding having a bad urine odour in your home. When blotting it up, make sure you never try to use a rubbing motion. You need a good quality paper towel or old cloth you don't mind throwing away. Blot the wet part of the stain, then rotate the cloth or towel, and repeat. Keep doing this until you believe you have gotten as much of the wet stain as possible. If you find the stain when it is already dry, wet it first with a spray bottle, then try to blot up some of the urine.
Absorb the Urine With Baking Soda
A great way to absorb the remaining urine that is in your carpet and get rid of the bad smell at the same time is by using baking soda. When you see a cat urine stain, first blot up as much of the urine as you can, then sprinkle some baking soda on it. Use enough to cover the entire stain and let it start absorbing into the carpet for several minutes. When you have let it sit for a while, just vacuum up the baking soda. The area should now be dry and fresh.
Never Use Ammonia-Based Cleaners
There are also some cleaners you can use for removing cat urine stains and smells, but never use something with ammonia in them. Ammonia smells similar to cat urine, so not only does it not cover up the odour, but to cats it might smell like a good place to keep marking. Instead, go to a pet store and choose cleaning products specifically labeled for cat urine stains. You can also use a natural product by combining vinegar and water in a spray bottle. Dilute the vinegar as much as you feel is necessary, as the smell can be quite strong. Spray the mixture onto the stain, letting it soak for a few minutes. Then blot it up with a paper towel. This also works great on tile flooring, but should not be used on marble.