Yes, you can block access to your Webflow site by country, but it requires using a third-party tool since Webflow doesn’t offer built-in geo-blocking.
1. Use Cloudflare for Geo-Blocking
Cloudflare is a popular tool that supports geo-blocking and can be used in combination with Webflow's hosting.
- Connect your custom domain to Cloudflare by changing your nameservers to Cloudflare’s.
- Point your DNS records in Cloudflare to Webflow’s IP addresses: (a) 75.2.70.75, (b) 99.83.190.102.
- In Cloudflare, go to the Firewall tab, then Tools → Access Rules.
- Under "Action," choose “Block”, select the country, and choose “This Website” to apply the rule.
- Repeat for each country you want to block.
2. Use Third-Party Reverse Proxy Solutions
If you're comfortable with more advanced setups:
- Use services like Fastly, AWS CloudFront with Lambda@Edge, or Vercel with custom middleware for IP geolocation and blocking.
- You’ll need to host your site behind a proxy and configure rules based on geolocation.
Note: This requires migrating off Webflow Hosting and serving the exported static Webflow project through the proxy/CDN.
3. Embed JavaScript-Based Detection (Less Reliable)
Some third-party geolocation services like ipdata.co, ipstack, or geoip-js provide client-side IP detection.
- You can use their scripts to detect location and redirect or display a blocking message.
- Limitations:
- Client-side solutions are not secure (they can be bypassed).
- They don’t actually prevent requests from reaching your server.
Summary
Webflow does not support native country blocking, but you can effectively block regions using Cloudflare’s firewall rules with a custom domain. JavaScript options exist but are less secure and not truly preventative.