Lots of cat owners get rid of their cats due to problems related to urinating in the house. The truth is that the majority of them could have been retrained with a little effort on the owner's side. Your cat is not spiteful; they simply don't know what spite is so they aren't doing it because you changed their brand of cat food! Cats that stop using a litter box are doing it for a reason. So to stop a cat from urinating in the house you first need to discover the underlying cause of why they stopped using their litter box in the first place.
To start with, is your cat actually urinating in the house or is your cat spraying? To tell the difference, if you find the urine low down on walls or furniture rather than on the floor then your cat is spraying, if there is a puddle of urine on the floor then your cat is urinating outside of its litter box. Which one your cat is doing is important as spraying is a different problem to urinating on the floor.
If your cat suddenly started spraying in the house then usually it will be caused by an environmental change. These are things such as moving house, bringing a new baby home, bringing a new pet home or even a new cat in the neighborhood. The spraying is your cat marking his territory and to stop it you will need to retrain him.
There are various causes that can potentially stop your cat from using their litter box. I have listed some of the more common ones here however it is impossible to list every possible cause so you may have to do a little investigative work yourself to discover your cat's actual cause. Hopefully this will give you some ideas of where to start so that you can stop your cat urinating in the house.
1. Medical Reason
Although you may think that your cat is well, cats can often be sick but appear perfectly well so if you cat suddenly stopped using his litter box then you should get him checked out by a veterinarian. Sick cats can associate pain with their litter box which causes them to avoid it.
2. The Litter Box Itself
Cats are very clean animals and will therefore not use a dirty toilet. Make sure that the litter is cleaned out regularly and fresh litter is put into the box on a regular basis too. Ensure that the box itself is large enough for your cat to maneuver around in and that the litter itself is deep enough for your cat to dig into and then bury its business. Cats don't like to be disturbed when using their litter box so make sure that your cat's litter box is in a quiet area of your home. You can consider an automatic litter box, such as Petree, Litter Robot, Catlink, Petsafe, Chillx etc.
Check here: 8 Best Self Cleaning Cat Litter Boxes 2020
3. Your Cats Age
When cats get old they can be caught short when needing to urinate. One way to help is to invest in an extra litter box and locate one upstairs and one downstairs so that your cat doesn't have too far to go to get to its litter box from anywhere in your home.
These are changes to your cats every day life. Things like moving house or bringing a new baby home. In a new house you will need to make your cat aware of the location of its litter box again. If you have brought a baby home recently then the urinating could be a form of attention seeking. Try to spend some time with your cat each day so that he knows you haven't forgotten him.