Jump to content

Blocking a country from accessing my site (geo restrict)

Go to solution Solved by paul2009,

Recommended Posts

  • Solution

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.

 

About me: I've been a SQSP User for 18 yrs. I was invited to join the Circle when it launched in 2016. I have been a Circle Leader since 2017. I don't work for Squarespace. I value honesty, transparency, diversity and good design ♥.
Work: I founded and run SF.DIGITAL, building Squarespace Extensions to supercharge your commerce website. 
Content: Views and opinions are my own. Links in my posts may refer to SF.DIGITAL products or may be affiliate links.
Forum advice is free. You can thank me by clicking one of the feedback emojis below. Coffee is optional.

Link to comment

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!

Link to comment
  • 5 months later...

Hi Drewcifer,

Thanks for your prompt resolve message.

I would like to know that your country restriction still working good with the cloudfare? 

Also, i would like to know that your blocked page is not showing in Google search result ?

You got any crawl or index issues in the Google search console?

Please reply to help me on the blocking of a page to the specific country.

I am also trying to block a /folder/ from my website to specific country to not see. If i do a block the/folder/ to specific country (for example: going to block all countries except India) using my hosting provider or may use cloudfare, is the Google will still crawl and index my /folder/ in SERP for all country users? or only for India users ?

Please help to clarify. thanks in advance.

Link to comment
  • 3 weeks later...
  • 11 months later...
  • 1 year later...

Create an account or sign in to comment

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

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.