You Can Now Block Country Traffic to Protect your Website
The security of our clients’ websites has always been one of our top priorities and something that we continuously improve on. The latest tool in our website protection arsenal, available for FREE on all hosting plans, is the option to easily block the traffic coming to your site from specific countries. This will not only increase your website security, but can also help website performance by decreasing resource usage when blocking the traffic coming from locations you would rather not get traffic from.
When to consider blocking the traffic from a specific country?
There are different reasons why someone would like to block the traffic from a specific country to their site, but the most common are the following:
- To Stop Malicious Traffic
If you notice abnormally high traffic from a country that your site is not targeting as audience, or you start receiving too many spam comments from such a country on your blog posts, or you identify any other behavior you consider suspicious, coming from a geographic region that’s not your main user target, it may be a wise idea to block the traffic from this location.
- To Streamline Your Business
There are various reasons due to which you might not be willing or able to do business with certain countries. Some examples are expensive and/or complicated deliveries; legal requirements that prevent you from providing your service, heavy taxation requirements, etc. Now, if you need to stop access to your site from a specific country due to such reasons, this can be easily done through your Site Tools.
How does SiteGround country block work?
Adding a country to your Blocked list is easy. You need to go to your Site Tools > Security > Blocked Traffic > Block Country section:

Once a country is blocked, all visitors coming from an IP address that we identify as being located in this country will start seeing our default Country Block HTML page.

The tool allows you to block multiple countries, and also to block certain countries from accessing your main domain, or specific sub-domains. You can review the list of all countries you have denied access to, and/or add or remove countries from it with a click of a button at any time.
Our new Country blocking option is also fully compatible with our SiteGround CDN and visitors from blocked countries would not be able to access your website pages whether you have our CDN service activated or not.
Comments ( 48 )
Thanks! Your comment will be held for moderation and will be shortly published, if it is related to this blog article. Comments for support inquiries or issues will not be published, if you have such please report it through
Dozza
This is a welcome addition to our toolset and something i've tried before with htaccess or plugins. Most of our sites are for UK audience, but get plenty of malicious attacks from Asia/Russia
Gergana Zhecheva Siteground Team
Glad you like it!
James
This is fantastic! I've been missing this feature since Cloudflare was disconnected. Is there a way to only allow traffic from certain countries? Is there a limit to the number of countries we can block?
Gergana Zhecheva Siteground Team
Happy to hear you find the feature useful! For the time being, there is no option for allowing traffic only from certain countries, but we will forward your suggestion to our R&D Team. There is no limit on the number of countries you can add in the Blocked countries list.
Kevin
I second this suggestion. It would be much easy to select the few countries some sites need to reach rather than having to select so many to restrict.
Mila Kanazirska Siteground Team
We see your point, and we will further look into this option.
Kate
I, too, would like to block traffic from ALL countries except my own.
Flip
Yes likewise... that would be a great addition.. we only do business with a few countries
Dimitar Dimitrov Siteground Team
Thank you for the suggestion - we would have it in mind when we add new features to the tool in the future.
Q
add one more up vote for blocking ALL countries except...
linclinc
Add another upvote for blocking all countries, unless chosen.
Bruce
This will be used! Blocking every country, will this have any negative effects like inadvertently blocking wanted countries?
Gabriela Andonova Siteground Team
Thanks for the comment, Bruce. The option to block every country is not yet available (though it’s already been forwarded to our R&D team). In any case, even if you add a country to your blocked countries list by mistake, it can be reverted from your Site Tools -> Blocked Traffic menu at any time. For more information, check out our tutorial.
Dennis
This is great! But what if I want to block traffic to all countries except one country? It all has to be done one at a time? And, if I block a country, am I also block Google's bots from those countries? Thanks!
Gergana Zhecheva Siteground Team
If you want to restrict the traffic from several countries, you'll have to add them one by one in the Blocked Countries list. As for Google crawler bot, its activity should not be affected unless you block the traffic from United States.
mark
Where to find the "site tools/security/blocked countries" menu spec'd above? Not on my wordpress site and not on siteground .com site
Gergana Zhecheva Siteground Team
You can find the menu in Site Tools, once you click Security on the left.
Joe
Are there logs and statistics we can review about the blocked traffic?
Gergana Zhecheva Siteground Team
Excellent question, Joe! For the time being, there are no stats for the blocked traffic, but the logs are visible in Site Tools > Statistics > Access Logs, once you search with the code "418". Hope that helps!
Jayavigneshwaran
This feature is very useful! And I want to customize the default Country Block HTML page content or display another page. Is that possible now?
Gergana Zhecheva Siteground Team
The option for page customization is not included yet.
Jonathan
Once we block a country, Site Tools does not display the country we've blocked. What's going on?
Gergana Zhecheva Siteground Team
This is not the usual behaviour of the interface. We are glad to see our Support reps helped you get that resolved. :)
Jonathan
It's me again :) Please consider adding to your list of countries, the following: TOR and Unknown Countries or Entities (same as Cloudflare does). Details: https://prnt.sc/95nTGW-l8XQM
Gergana Zhecheva Siteground Team
Thank you for the recommendation! Your suggestion was forwarded to our DevOps Team.
Dennis
Thanks for this addition. I am glad that I have started using SiteGround as my hosting provider for my sites. You have not disappointed me yet and I am a very grumpy old man!
Gergana Zhecheva Siteground Team
Happy to hear we are living up to your high standards, Dennis.
Charlie
Love this idea. Unfortunately I feel it's incomplete. Realistically most sites I deal with do not need ANY other country to access them outside of the USA, really even outside of just a couple states. But I'd be happy with USA or North America. I understand I could go one by one and deny countries but that would be pretty painful to do for several sites.
Gergana Zhecheva Siteground Team
Thank you for your feedback, Charlie. For now, the Blocked Country menu does not allow the option for blocking multiple countries at once, but your feedback was forwarded to our R&D Team for consideration.
British Guy
Country block is a fantastic addition. I would like to see bulk upload for country block because we have a business that can only trade and deliver within the UK. It is taking ages to select each country to block. Unless of course you offer allow only the following countries at access website.
Gergana Zhecheva Siteground Team
We are glad you like the feature, your feedback was forwarded to our Product & Technology Development Team. Our colleagues would consider your suggestion for future releases.
Mark
PLEASE allow the option to select only ONE country to KEEP and the rest to delete. ALL Local websites do NOT want traffic from other countries or even out of their geographical area. If SG examines their data, I would guess most websites are not global and may not even want traffic outside of their own country. This looks like a great tool for all 50+ websites that do business in the USA ONLY, but I would have to go through EACH website and go through EACH country to block them. Site Ground is a great company and I hope you are able to investigate and resolve this issue. Thank you!
Mila Kanazirska Siteground Team
We received other requests for similar functionality, and as we always aim to provide features that will be useful to our customers, we are glad to say this is already on our list for future research and development. We do not have an ETA, but it will definitely be something we will look into.
Nicolay
Perhaps a reverse selection method would be easier for the developer team: ONLY accept visitors from THESE countries?
Gergana Zhecheva Siteground Team
Thank you for your suggestion, Nikolay, we will look into it.
Estella
I believe this is more practical.
Jeff
Yes, a reverse selection would be great. I'd like to block all but the US and Canada. Thank you!
Mila Kanazirska Siteground Team
Thank you for the feedback. This has been added to our list for further research, and we will have it in mind for future development.
The Body Guard
brilliant add-on
Frederike
This is a great addition. I manage over 100 websites on Siteground for my Australian clients. I would love to add a block for all of them for certain countries but it will be painful for me to do this one by one for each website. It would be great to have the ability to select multiple websites and apply the block to all of those at the same time.
Mila Kanazirska Siteground Team
There is no limit to how many countries you will select, but we see your point, and we will research how we can ease the process.
Kip
Thanks for this tool, and for all of your great security work! I'm curious what percentage of the time the use of VPNs defeats GeoIP blocking. We have site-resident security software that dropped this feature because it was ineffective against VPNs who spoof their originating IP. Also, it may not happen often, but legitimate traffic could be blocked that appears to come from a "forbidden" country, but really originates in an "allowed" country?
Mila Kanazirska Siteground Team
Hello Kip, you have an interesting question. We don't have statistics on how many customers use VPNs, and it is not something we can track on our end. It is possible to be caught by such a Geo Block tool in case you use a VPN, but we believe customers understand the risks vs. the advantages of using the tool.
Joseph
This feature is great! We are an agency with almost 200 websites and most of them provide local service. Please have the option to block traffic from ALL countries except my country.
Ivan Naidenov Siteground Team
We appreciate the positive feedback and thank you for the suggestion, noted!
Jasmine
I just found out about this tool. The magic that was missing.
Mark
So many people commenting that it would be MUCH more useful to block all countries except one! How is it that this update has not been made yet?
Gabriela Andonova Siteground Team
Hey Mark! We appreciate your feedback and suggestion. Our customers' input is very important to us, and we are committed to constantly improving our services. While we cannot provide an exact ETA, rest assured that your request has been taken into consideration as we strive to enhance our tools. If you have any more ideas or questions, please don't hesitate to share them with us.
Start discussion
Thanks! Your comment will be held for moderation and will be shortly published, if it is related to this blog article. Comments for support inquiries or issues will not be published, if you have such please report it through