How to block countries from your Squarespace website.
There can be various motivations behind wanting to restrict access to your website in certain countries. Perhaps your products and services are specifically tailored to the country where you operate, or you're concerned about the risks of hacking or denial of service (DDoS) attacks.
To achieve this goal, one highly efficient solution is to employ a third-party proxy service such as CloudFlare. Another alternative is to invest in a third-party geolocation service that provides code snippets you can integrate into your website's code injection header.
This article will guide you through the process of utilizing CloudFlare to effectively block access to your site from specific countries.
1. Create a FREE Cloudfare account and added your Squarespace website. Also, you will need to change the Nameserver to complete the process.
If your domain name is held on Squarespace you follow the process below:
In the Home Menu, click Settings, then click Domains.
Click the domain you're working to connect.
Click Advanced Settings.
To your top right click on Nameservers. Finally clicked the radial button that says ‘Use Custom Nameservers’ and added the two URL's provided during your registration process with Cloudfare.
If your domain name is held by a third party, like goDaddy, Bluehost or Namecheap, you will have to change the Nameservers there.
2. Cloudflare will verified the change within minutes.
3 On the "IP Firewall" tab, you can enter a IP, IP range, or Country and click block.