How to Ban Visitors from any Country to visit your proxy?

Blocking with .htaccess

The .htaccess or hypertext access file is one that can be used for modifying  access permissions to any folder or subdomain on your site. If the .htaccess file is present on your hosting account by default, then all you need to do is edit it. If not then you need to create and upload one.

Creating a .htaccess file

  • Create a text file on your PC and name it htaccess.txt (or anything else)
  • Upload it to the root of your hosting account. In most cases, put it in the folder which has the folders by the name of public_html, private_html etc. If you do not know the root folder, simply ask your host.
  • Then using a FTP client or the File Manager of your host, rename the file to .htaccess. check that the file name is dot htaccess (don’t forget the dot)
  • You cannot create the file with the name .htaccess in Windows and hence you need to follow this process

Banning Countrywide Visitors

  • Visit Block a Country
  • Select the Country that you want to ban
  • Get the .htaccess details for that country
  • Copy it and paste it in your .htaccess file
  • Now, all visitors from the country will not be allowed to enter the site

Country IP Blocks

Country IP Blocks is similar to Block A Country but it allows you to choose CIDR (Classless Inter-Domain Routing), Netmask, IP Range, .htaccess deny, .htaccess allow, Decimal/CIDR, or Hex/CIDR. It will also tell you what’s the ISO code for the country, total networks and subnets in the list.

2 thoughts on “How to Ban Visitors from any Country to visit your proxy?

  1. time66 says:

    nice tutorial thanks

  2. tim says:

    thanks a lot you saved my day

Leave a Reply

Your email address will not be published. Required fields are marked *