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.
- A Domain Name
- Hosting service with cPanel access or FTP
First, we will learn how we can block a site using .htaccess file.
Go to File manager from your cPanel.
Select the country and select format as .htaccess Deny and create ACL. It will generate a list of IP addresses for that country.
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.