This can be very stressful for you, there are a few things you can check to try and get back on track:
1. First make sure that there is nothing physically wrong with your cat. If they are now going to the toilet all over the house it could be a sign they have an infection like cystitis. Check their poo looks normal too, they might be having problems with their bowels or kidneys. If you are worried, have them checked by a vet.
2. Has their litter changed? Cats can be fussy about this so try using different types of litter to see if there’s one they prefer.
3. Has the amount of litter changed? Some cats will only use a tray with very deep litter.
4. Has the litter tray moved? Cats will only go to the toilet in a place where they feel safe and private. Try putting a selection of trays in different rooms to see which one your cat likes best. If your cat is soiling the house in one particular place, then move the litter tray there.
5. Have you recently got another cat, or is a stray coming into the house? The scent of another cat will be off-putting, so if you have more than one cat then each of them should have a tray.
6. Have you moved house, changed the furniture or redecorated? Has something else changed in the house like a new baby? If you think that stress may be why your cat isn’t using their tray then try using a calming spray or collar which can help relax them.
7. If your cat is peeing or pooing somewhere you don’t want them to then try putting tinfoil on the floor. Most cats won’t like walking on it and so will look for a nicer place to go - hopefully the litter tray!
There are some cats who just don’t like using litter trays and prefer to go outside. If this sounds like your cat you may want to try taking their tray outside too and putting it next to a cat flap or letting them out regularly to use it.
Of course all cats are different but with patience most of them will soon get the hang of a litter tray. Then you will be able to just enjoy the best thing about having a cat - cuddling up together!