A cat sprays on vertical surfaces in a house like the wall or the wardrobe or the blinds. When a cat sprays outside the litter box, you would think that there is some problem with the litter box which is causing the cat to spray outside the box. You may go berserk thinking how to stop a cat from spraying. Well, you need to relax a little bit.
Sometimes, a cat would want to leave a message to another cat. If a street cat somehow gains entry into the house through an open window, your pet cat would have definitely spotted it. So, it would want to send a message across to that street cat that the house is its territory and would ask that street cat to stay away. The cay uses spraying as a technique to send this message across to that cat. The cat thinks that if it sprays inside the litter box, the message may not reach the street cat. Similarly, if the cat spraying is a male cat and there is another female cat in the house, the cat would spray outside the litter box to show the female cat that it is in heat. It is its ways of communicating to the female cat that it wants to mate.