If you are a website owner, in some condition ,you need to block some specific countries or IP-address because they are trying to spam your website or hack your website.
Today i am going to show you How to Block Visitors by Country for your Website ?
1. Use CloudFlare :-
CloudFlare is really nice service to block your website for particular country. To use Cloudflare, you need to be change the dns address of own server to cloudflare dns server.If You are using Hostgator hosting services, you can easily enable it with your cpanel, without changing your dns address. When you configure it. go to the Threat control
and enter the your Country name or IP-address
The htaccess file is a configuration file which is used on Apache based web servers to control many features of the server. The file itself is just a small basic text file and can be edited, via notepad, or your hosts file manager, thru c-panel redirects or alternatively you can download the .htaccess file from your server’s home public_html folder, edit it and reupload it FTP using programs like FileZilla or Adobe Dreamweaver.
This site is really providing the nice service to create htaccess file entry for particular country. Select your country and click on the Download option. and add it in your htaccess file.
With above mentioned methods, you can easily block the specific country visitors on your site.
Hope you like my post.Block Visitors by Country for your Website. Please Share with others.