The Mishna teaches that a person who vows not to enter a city can enter its tehum, or boundary (the 2,000 amot that surround the city and are considered related to the city with regard to travel on Shabbat), but not the area immediately surrounding it (iburah – its outskirts, the 70 amot closest to the city). At the same time, someone who vows not to enter a house only prohibits entry from the agaf – where the door closes – inwards to the house.
When the walls of a house are thick, we will often find a situation where there will be a large amount of space in an entranceway, due to the fact that the agaf is closest to the interior of the house. It is clear that if the door is located on the outer part of the agaf, the entire entranceway will be considered part of the house; our Mishna is teaching how we should view the entranceway when it is separated from the house by the door.
The last rule of the Mishna is notable not because of the area in the house that is forbidden, but because of the area outside the house that remains permitted. Even if the door is in the middle of an entranceway, the outer part will not be considered part of the house for the purposes of this vow. In this the house is very different from the city, where an area outside the city is viewed as being part of the city with regard to this halakha. Furthermore, this stands in contrast to other areas of halakha – for example, the holiness of the Temple and Jerusalem – where sometimes the area of entrances like doorways and windows are considered to have the kedusha of the inside.
The image of a doorway was taken from the Hebrew edition of the Steinsaltz Talmud, Tractate Pesaḥim, daf 85, page 369.