There may be plenty of causes for cats spraying. If you are the owner of the cats, then the onus is on you to figure out how to stop cats from spraying inside the house. Fear is a common reason why your cats spray inside the house. Consider an example of someone new visiting your house. Your cats may become afraid of the new person in the house. That fear would be enough for the cats to spray urine inside the house at random places. When the cats are fearful, they don’t think about anything else. They would instinctively start spraying urine. A good tip for you as the owner of the house and the cats would be to make sure that the cats don’t see the new visitor in your house. Of course, you cannot stop visitors to your house. So, what you can do is when somebody is visiting you in your house, you can put your cats in a kennel or a separate room until the visitor goes away.
It is common for cats to get frightened by new visitors especially when the cats are young. It is not often that you see young and brave cats. You can train your cats to be bold and courageous. But, it wouldn’t always work.
I have seen many cat owners who have the habit of punishing their cats as a way of stopping cats from spraying inside the house. Someone might have told them that punishing is a good way of how to stop cats from spraying inside the house. But, it is 100% untrue. Any cat specialist worth his or her salt would definitely advise you against punishment as a way to stop cats from spraying inside the house. On the contrary, punishment may induce even more fear within the cats and they would spray more frequently.