Return to Help Center

Welcome to the Bravenet Help Forums. Here you can chat and meet other Bravenet Members. Please do not post advertisements.

Forum: Domains Discussions
Start a New Topic 
How to block visitors from China Brazil Russia

It scares me to see in web stats how many times I get hits from China, Russia, Brazil, Kazakhstan and others. I would be happy if I could block all visitors outside of North America. Any way to do this?

Re: How to block visitors from China Brazil Russia

There are no input forms or mailto links on your site so there is nothing for a spammer to use and nothing to be frightened about.

All major search engines will visit your site regularly including Yandex (Russia) and Baidu (China). This is no more suspicious than the Googlebot.

Also remember that the web is international. You could loose inbound links when people from Europe or Australia report the "broken" links to the linking sites.

Re: How to block visitors from China Brazil Russia

Hi Peter,
Thanks for checking it out, I am more concerned about corporate espionage then spammers so I am waiting to put specific information on our website. All the best, Tom

Re: How to block visitors from China Brazil Russia

The easiest way to block visitors from a country is by using .htaccess because you can do it ourselves through FTP without installing or messing with the iptables firewall rules. You have different places to obtain a generated country IP list in CIDR format for free, for example, ip2location. Compare Top Three Web Hosting Services 2016 : Godaddy vs Bluehost vs Hostgator Reviews Cheap Email and Web Hosting Plans: Pay Moth to Month - Register Domain Names for Free Bluehost Coupon 2016 - Discount Promo Codes Compare Top CMS of 2016: Joomla vs Drupal vs WordPress

If you want to block visitors by country using htaccess, make sure you periodically generate a new list because the IP address database changes from time to time or else you might either miss or wrongly block visitor from other countries.

If you want know more about the details, have a look at:

Hope this helps.

Re: How to block visitors from China Brazil Russia

You can use firewall and related tools to block specific traffic. Also, if you use WordPress then there are many plugins which can be used for stopping any traffic from any geo-locations.
M Imran from

Re: How to block visitors from China Brazil Russia

If you don't want traffic from Russia, Brazil and China then just use the following code so that your website will not be opened from these countries:
MaxMindDBEnable On
MaxMindDBFile DB /path/to/GeoIP/GeoLite2-Country.mmdb
MaxMindDBEnv MM_COUNTRY_CODE DB/country/iso_code

SetEnvIf MM_COUNTRY_CODE ^(RU|DE|FR) BlockCountry
Deny from env=BlockCountry

There are many assignment writing service websites who have done this to restrict traffic from unwanted countries. Hope this will help you. Thank You

Re: How to block visitors from China Brazil Russia

One has to appreciate this excellent piece of writing. It is much creative as well informative and i am glad to see the writer’s knowledge. Students can also learn academic writing by opting for our assignment help as they get a comprehensive assignment written from us.