Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
Drewcifer

Blocking a country from accessing my site (geo restrict)

Question

Does any one know a quick and easy way to geo restrict my squarespace website so that I can prohibit access to it from a specific country or even to allow access only from my own country? And do so inexpensively? 

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

It will depend on why you need it and what you hope to achieve.

In short, there isn't a true "geo-blocking" solution that you can apply to Squarespace 6 or later. There are some workarounds, but they cannot truly block all access to your site, at least not in the security sense of the term. For example, you could try to prevent users reaching your website via its primary domain name but you could not prevent them from reaching it via the built in .squarespace.com domain. For this reason, if you are trying to stop a country accessing your site because of potential hacking or dDOS attacks, you should rely on Squarespace's extensive built-in security measures. You cannot add to them.

However, if your product licensing agreement restricts you from advertising your products in a particular country and you simply want to stop people in that country from stumbling upon your site, there may be options that can help. Please note that none of these are supported by Squarespace, so if you get into difficulties, you'll be on your own. Also, bear in mind that most workarounds will be bypassed by visitors who are using an out-of-country VPN service.

  1. The most effective option is to use a third party proxy service. There are some free plans with a limited number of rules but if these don't meet your needs you need to purchase additional services to. Note that this will require you to modify your DNS settings so that all web traffic is sent to the proxy service first.
  2. Another option is to purchase a third-party geo service that will supply code you can add to your website's code injection header. These services will also charge on an ongoing basis to provide their service.
  3. Finally, you could hire a developer to write some specific code for your site, but as internet topology changes every day, this will need to rely on one of the IP address services (option 2 above) or it will become out of date quickly.

 


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDatepicker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links. Book a Squarespace Expert when you need help.

Share this post


Link to post
  • 0

SOLVED... Paul, thanks for the response. In a different, related, post you mentioned Cloudfare.com and after you replied to this post, though you hadn't mentioned it again, I decided to give Cloudfare a shot.

For anyone else who wants to Block Countries in Squarespace this is what I did...

1. I started a FREE Cloudfare account and added my Squarespace website. I had to change the Name Server on Squarespace to complete the process.

2. To do that I went to my Squarespace website then Settings, Domains, clicked on the gray box with my website URL, clicked on the gray box that says Advanced Settings, at the top of Advanced Settings I clicked on Nameservers, clicked the radial button that says Use Custom Name Servers and added the two URL's that were provided to me during my registration process with Cloudfare.

3. Cloudfare verified the change within minutes and from the Cloudfare website I selected the tab Firewall, then clicked + Create Firewall Rule.

4. The rest should be pretty self explanatory depending on what you specifically want to do (restrict, allow, etc...). Hit Deploy

5. Using a VPN I attempted to access my site from my restricted country and Voila, I couldn't reach it.

I am considering changing the appearance of the error page, but to do so I will have to upgrade to the $20/mo subscription, which I may or may not do.

I hope this helps anyone else wanting to do the same thing. I am the end user of my website and not a developer so I spent a lot of time looking into this and I am quite happy that after 2 weeks of research that it is done, and done for FREEEE!

Share this post


Link to post
  • 0

Yes, CloudFlare is one of the best third-party proxies available. 


sf-digital-signature-logo-email145.png.46606a2288a2847f44d81b9b7b58f3a5.png
Hi, I'm Paul, founder of SF Digital, a specialist company building the features that Squarespace didn't include
I am a Squarespace Developer and Squarespace Circle Leader with a
strong reputation on the Squarespace Forum. I'm trusted by thousands of Squarespace users worldwide, including designers, freelancers, business owners and agencies. My extensions add capabilities to Squarespace websites around the globe. They include the Enquiry Form ExtensionDatepicker Extension and Age Verification ExtensionNeed a custom Squarespace extension? Tell me about the functionality you need. Note that some links in my posts may be affiliate links. Book a Squarespace Expert when you need help.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...