Is there a way to Geofence a Site / Restrict Access by Location?

I’m looking for a way to restrict access to my site by location. For examples:

  1. A prospective user does not have an IP address that is located within 160 Km of a certain city, then netlify should not serve the site.

  2. A prospective user does not live within a certain country, then netlify should not serve the site.

  3. A prospective user lives within 160 Km of a certain city, then netlify should serve the site.

Or any other way to control where prospective users are coming from while my site is active on netlify would be of help.

Hi there,

to the best of my knowledge it is not possible to restrict access the way you are describing on our service.

I’m scratching my head as to how we could help you, and one thing we do have is country based redirects:

https://docs.netlify.com/routing/redirects/redirect-options/#redirect-by-country-or-language

I know this is unlikely to be as precise as you are looking for, but maybe it is helpful?