The Talmud (Menachos 33a) records testimony that the doorway through which Rabbi Yehuda Hanassi (Rebbe) entered his beis medrash did not have a mezuzah. The Talmud questions why it did not and refers to the beis medrash of Rav Huna as an example that such doorways should have a mezuzah. The Talmud answers that in the laws of mezuzah we follow the commonly used entrance. One can infer from this gemara that when there are multiple entrances to a room or to a house, only the most commonly used entrance requires a mezuzah, while the others do not.
Less than one page later (34a) the Talmud teaches that while a home with one entrance requires one mezuzah, a home with two entrances requires two. The same would be true if there were four entrances. They would each require a mezuzah.
Which one is it? Does each entrance require a mezuzah or only the most commonly used?
There are several ways to understand this contradiction (see Rashi 34b) but the accepted halacha is that each door used to enter a home is required to have a mezuzah (Shulchan Aruch, YD 286:17-18). The reason that Rabbi Yehuda Hanasi did not have a mezuzah on the door entering the beis medrash is that the beis medrash was directly connected to his home. In fact, there was a mezuzah there. However, it was not on the right side as he entered the beis medrash but rather on the right side as he entered his home. It was not actually an exterior door (Rambam Mezuzah 6:11, See Emek Beracha p. 30).
There are several cases when even exterior doorways don’t require a mezuzah:
Exit Doors – Rav Shlomo Zalman Aurbach (Minchas Shlomo, Tinyana 100:5) maintains that a door that can only be opened from the inside and is meant to let people out in case of emergency does not require a mezuzah. In general, he believes that a door which is not meant for people to both enter and exit does not require a mezuzah. The same would apply to an exit door from a store when it is specifically designated as such (Sefer HaMezuzah 8:2). However, in many cases, doors labeled as exits are also used by people to enter the building despite the label. In such cases, the door should have a mezuzah on the right side heading into the building and not on the right side going out.
Windows and Cellar Doors – A window that is more than 10 tefachim (36 inches) off the ground does not need a mezuzah even if people often climb through it. (Chovas Hadar 7:18).
Cellar doors (see picture) do not require mezuzos as they are usually less than 10 tefachim high.
Rarely Used Door – An exterior door that is rarely used is subject to a dispute. Many authorities maintain that any door to the outside would require a mezuzah no matter how rarely it’s used so long as it is not boarded up or otherwise walled off (Aruch Hashulchan 286:38). However, there are authorities that claim that a door which is only used rarely is not obligated to have a mezuzah (Igros Moshe YD 1:177). The term ‘rarely used’ is hard to define but some use 30 days as a guide. This could be applicable in the case of a door to the basement or one of the doors of a multi-car garage that is rarely opened.
There are a few exceptions to the lenient opinion. If it is the only door to an area that is obligated in a mezuzah, it should have a mezuzah even if it is rarely used. This is relevant to the case of a boiler room that is rarely visited. Another exception is if the door was built with the assumption that it would be used more regularly. Even if one ceases to use it regularly, it doesn’t lose its mezuzah obligation.
Finally, if the door has a specific purpose for which it is used, even if it is only a few times a year, it seems that it should have a mezuzah even according the lenient opinion. An example of this is a door to the basement that is used every year to bring the succah out and to put it back in the house.