Our cat wants to go outside but we dont let it go because it gets into fights with other cats. I dont know if this cat is domestic but we keep it indoors. My question is that when we open the front door on shabbat to leave the house and then close it, is this considered trapping becyase maybe the cats not domestic. What if we are closing the door because we want to protect the house and we dont want the cat to go out?
Although you suspect that your cat is not tame and gets into fights with other cats, it doesn’t mean that it isn’t considered domesticated. The cat would be considered completely domesticated if the cat will relax and immediately submits willingly when you grab it, or it comes to you for food, then. Therefore most household cats that are pets are considered domesticated. Id the cat is considered completely domesticated t is already considered trapped and tzod will not apply to it.
Even if it isn’t totally domesticated, if it will come back home at night, it means that the cat feels that your home is his place, and it is considered, at least, partially domesticated. If the cat is only partially domesticated, according to the Rema we may not trap it on shabbos, however it is still permitted to close the door of the house to prevent it from running out. This is because the house is big and the cat cannot be caught in one swoop, therefore confining it to the house will only tzod d’rabonon. The poskim say that since it is already confined to the house, and you are only causing it to stay confined to the house, it is permitted to open and close the door.
According to the above it is permitted to close the door of the house even if your intention is to keep the cat inside.
Shulchan Aruch O:CH 316-12, Eshel Avrohom (Butztach O:CH end of siman 316), Toras Hamelachos Tzod 122 in the name of R’ N. Karlitz shlit”a, The 39 melachos pg. 868, Biur Halacha 316-6 D:H Vholach, Orchos Shabbos 14-17.