The Poskim discuss whether the prohibition of Saad (trapping) applies when closing the door of the house after domesticated pets, such as cats and dogs, return from outside. Shulhan Aruch (316:12) rules that trapping does not apply to domesticated animals, because they are essentially “intrinsically trapped,” as they have no impulse to flee like wild animals do. The Rema rules that it is prohibited M’drabanan (Rabbinically), since, nevertheless, closing the door restricts their range of movement.
The Ben Ish Hai (Rav Yosef Haim of Baghdad, 1833-1909) holds like the Rema, whereas Hacham Ovadia and the Menuhat Ahaba (Vol. 3:17:4) are lenient and rule in accordance with Maran. Of course, these pets are still Mukse and may not be moved. This leniency only applies to a pet that has already been trained to be domesticated, but a new pet that does not “willingly” come home is a problem of trapping.
If animal that was never domesticated, such a stray cat, enters one’s home, the Menuhat Ahaba rules that it is best to “shoo” it out of the house before closing the door. This avoids a potential problem of trapping the animal by closing the door. However, if a person did close the door, he probably did not violate the prohibition, because of the following mitigating factors. First, the whole issue of trapping inside a house is only prohibited M’drabanan (Rabbinically), since even when the animal is in the house, it cannot be caught with a single lunge. Second, closing the door is a “Pesik Reshe D’lo Nicha Leh”- an inherently permitted action that has an inevitable prohibited consequence (trapping) which is of no interest to the person. In cases where the prohibition is M’drabanan, the Halacha permits such actions.
It is permitted to close the door of the house after a domesticated pet returns home.