[openingText]WordPress is an open source content management tool. It is written in PHP and MySQL. It is an easy platform to create beautiful sites. There may be various reason to block countries from your website. Sometimes you may face attacks from a specific country, get spam posts in your site or you just want to deny access to your site from certain countries. In this tutorial, you will learn different steps of blocking a specific country.[/openingText]
Prerequisites
- [tool]A Domain Name[/tool]
- [tool]Hosting service with cPanel access or FTP[/tool]
Step 1:
First, we will learn how we can block a site using .htaccess file. [step]
[stepImage]
[/step]
Step 2:
Go to File manager from your cPanel. [step]
[stepImage]
[/step]
Step 3:
Select the country and select format as .htaccess Deny and create ACL. It will generate a list of IP addresses for that country.
[stepImage]
[/step]
Step 4:
Conclusion:
By following above mentioned steps, you can easily block your wordpress site in specific country.
Check out the top 3 WordPress hosting services:
- Click here to get the best wordpress hosting specialized for wordpress.


