2,803. Vowing Not to Enter a House or a City

Hilchos Nedarim 9:16

If someone vows not to enter a certain house, he is prohibited to go past the doorway. If he vows not to enter a certain city, he may enter within its Sabbath boundary (techum) but he may not enter its outskirts.

Hilchos Nedarim 9:17

Let’s say that someone vows not to benefit from the residents of a certain city. If a person lives there for 12 months, the one who vowed is not permitted to benefit from him; if he resides there for a shorter span than this, it is permitted. If he vows prohibiting benefit from those who dwell in a city, he may not benefit from anyone who has lived there for 30 days but he may benefit from those who have dwelled there for a shorter span of time.