There are several reasons why you might want to keep your cats out of the room, such as the presence of a baby, a relative with allergies, or just the possibility that the cat will want to destroy the furniture! Some people just don't want to allow pets into a place; whatever the reason, with a little creativity and determination, you can use a few ways to keep the cat from entering rooms in the house.
Steps
Method 1 of 2: Preventing Your Cat from Entering a Room

Step 1. Close the door to the room he is not supposed to access
This is the most effective way of not letting the animal enter a certain space; if there is no port, install it as soon as possible.
- Even if a physical barrier prevents the animal from entering, it can still try to overcome the impediment.
- Restricting a cat's access to a room can make him stressed. There is always the possibility that he will end up adopting negative behavior and applying it to another part of the house.
- Ideally, you don't just let him in as an emergency measure; see a veterinarian or trainer for more information.

Step 2. Make it a habit to get in and out quickly
It can be tricky to prevent the pet from entering a room anyway, so act quickly! Try to distract him with toys and snacks so he can access the room and close the door before he notices.

Step 3. Create another type of barrier if the room doesn't have a door
It's complicated to build a physical impediment that won't let the animals in, but try to build a barrier according to the feline's agility. Baby gates don't work with all cats, but when yours isn't as agile or older, a small fence will keep you out.

Step 4. Leave the pet in a cattery outside the residence
Let him roam around the house only when you let him, closing as many doors as he likes. This way, it will not be necessary to worry about the "where" of the animal when it is well closed inside the house. However, cats can be very stressed when they have limited territory, causing anxiety, which can manifest itself through destructive behavior, urinating or defecating in inappropriate places, or even bladder problems.
- To minimize the risk, give it plenty of room to explore. Install high platforms for the cat to sit and analyze the place, have spots where he can hide for privacy and leave the litter box and the little dishes with food and water nearby.
- If he stays outside, there must be shelter from the intense sun, as well as from the wind and rain.
- Check if the cat has mental stimulation. Toys, the owner's attention, and spending time having fun with him (two ten-minute sessions at least) will get him mentally stimulated.

Step 5. Ignore the animal if it starts scratching the door of the room you are in
Scolding will not do and he will repeat the behavior. When the "game" of the pet doesn't have a "reward", bad or not, it will avoid repeating that.

Step 6. Place something near the door that will frighten the cat away
When it's important that he doesn't scratch it, leave a canister of compressed air with a motion detection trigger right next to the door; as soon as its movement is sensed, a jet of compressed air will be released. The cat will not be harmed, but it will be frightened and will learn to associate that door with an unpleasant experience, making it always think twice before approaching it.
Method 2 of 2: Turning the room into an unwanted place for the cat

Step 1. Make the room physically uncomfortable for the pet
Sometimes there is no way to put up a physical barrier to keep him from entering the room; the alternative is to make the place unpleasant for the cat. Make loud noises whenever he enters the room or scare him away; be aware, however, that he may associate the noise with you, making him afraid whenever he sees it.
- Other more “radical” methods may also be used, depending on the case. For example: put some water on the bathroom floor so that the animal does not enter, especially if it does not like to get its paws wet.
- One more example: make sure the cat doesn't have a place to hide in the room in question. Sometimes they like to get under beds or stay in corners to feel safe; block their access to these spaces. The pet will feel uncomfortable.

Step 2. With a spray, spray the cat with water
Whenever he approaches the room, have a spray bottle of water on hand to throw a little at him, which will understand that his actions are not acceptable.
However, use this method only if you are prepared to accept that the bonds of your relationship with the cat will be shaken. He's likely to associate the water spray with you rather than the bedroom, increasing the chance that he'll run away and not want your company

Step 3. Also, there are electronics that are specially designed to expel air over the cat as it approaches the spot
After purchasing the device, place it at the entrance to the room and let it chase the animal away.

Step 4. In the room, put smells that are repulsive to the feline
Pour a small amount of vinegar at the entrance to the room or some parts of it; in most cases this will help, as cats hate the odor of vinegar. However, this is just informal advice; not all people see positive effects.
Another option is to fill a spray bottle halfway with vinegar, supplementing with lemon juice. Spray the solution at the entrance to the room, on the beds and in the places he usually frequents. It's a good technique so they don't scratch the furniture or just stay in the room. The vinegar spray will have to be reapplied several times

Step 5. Change the cat's focus of attention
Make another room a more comfortable place for the animal, so that it is more willing to go in it than the room where it is not allowed to enter. Prepare several spots where the cat can sleep (even if it will probably end up choosing another one) and a high shelf to look at. In this room, put a small dish with food, another with water and a sandbox, as well as toys.

Step 6. Perform positive workouts
This technique requires you to make a little “mess” with the cat, so that the experience is positive and he associates this other room with pleasant experiences, increasing the desire to go back there. You can also spread treats in the room to make it even more attractive to the pet.
Tips
- If the cat really wants to access a room, he will be scratching the door incessantly, and may even peel it and force entry. However, it will stop after a few minutes as long as you ignore it.
- Do not let the cat enter a room where it has peed outside the litter box. This behavior is typical of a cat who is feeling stressed in some way; it's better to get to the root of the problem to find out why he did it. At this point, remove it from the room and place a pheromone diffuser (Feliwa), which will calm the pet down.