If you running a website, then by default it is accessible to everyone. For some reasons, you don’t wanna share your content to other nations or your website is simply not relevant to people in other countries.
However, you’d want to allow visitors from all over the world to access your website. But there are situations when there is a need to block visitors from some countries.
Table of Contents
For example, if you’re running an online local store so your visitors might be from your country. Then there is no need to let any other countries waste bandwidth on your server. And there are many reasons why you might want to block users from certain countries from using your site.
Best WordPress Plugins to Block Countries
Now there are many ways to block visitors from a country by using .htaccess, cPanel IP blocker but these ways will only block certain IPs while you want to block the whole countries IPs.
Read also: How to Change The WordPress Login URL
The plugins we listed have huge IP geolocation databases, so it can block any country IPs you want.
IP2Location is a Malaysian company that has a huge Geolocation Database like the country’s IPs, ISP, and zip codes. From this database, they can easily blacklist any country IPs you want. They also offer a plugin for WordPress with the same name.
This plugin will allow you to block unwanted visitors from accessing your frontend (blog pages) or backend (admin area) by countries or even from proxy servers. With this plugin, you can block access from multiple countries.
The key feature of this tool is that it has very genuine and updated bin data, not like having old GeoIPs database like other services do. Because the IP address database should change from time to time or else we might either miss or wrongly block visitors from other countries.
IP2location also allows you to redirect users to a predefined page based on countries, and customize your 403 pages but to do this, you’ll need their one more lightweight plugin named IP2Location Redirection. The thing I like, this tool allows people to send an email alert to you if some peoples are mistakenly blocked so you can whitelist their IPs
2. Geo Target Plugin
Geo Target plugin is a little different and must-have plugin if you’re intended to show your posts, pages to a specific location like cities, states, and countries.
This geo filter plugin allows users to easily filter content to visitors based on their IP address. With this plugin, you can target the right audience with the right product and services as it’s perfect for showing needed content or redirecting the customers to the right pages.
- Comparison table
- Can Target cities, states, and countries
The key feature of this tool is that you can easily filter content specifically to people of different countries also it redirects the users to a different page if they match your Geo target rules.
3. iQ Block Country
Another good option is iQ Block Country, it’s a plugin that allows you to limit access to your website content. You can either allow or disallow visitors instance from defined countries to (parts of) your content.
Even if you block a certain country, you can still allow certain visitors by whitelisting their IP address just like you can allow a country but blacklist IP addresses from that country.
This plugin uses the GeoLite database from Maxmind, now this plugin does require some additional steps. What you’re gonna have to do is download their GeoIP database and need to upload in /wp-content/uploads/ through cPanel or FTP client.
- Download the GeoIP2 Country database
- Unzip the GeoIP2 database and upload the GeoLite2-Country.mmdb file to your upload directory, so it usually looks like this path /wp-content/uploads/GeoLite2-Country.mmdb
With this plugin, you can see unwanted login attempts by going the Loggings tab under the iQ block dashboard too.
Now it seems like most attacker knows my login URL as wp-login.php, so I just the change the login URL, you can refer this article to Change The WordPress Login URL Without a Plugin.
4. IP Geo Block
IP geo block is another popular freemium blocking country plugin. It receives over 40k downloads along with great overall reviews (4.5).
The key feature of this plugin is that it will not only block the country’s IPs but also protects from an attack to the back-end of our site by blocking requests from undesired countries and also with the original feature ”zero-day Exploit Prevention”(WP-ZEP). It also prevents unwanted entries from the login form, comments, and XML-PRC. That’s why this plugin is listed on this list.
IP Geo block uses multiple sources of IP Geolocation databases such as IP2locations, Maxmind. It cooperates with full spec security plugin, easy rescue, and self-blocking prevention, etc.
Almost every WordPress users know about Wordfence, it’s one of the most popular WordPress security plugins in the market.
WordFence comes with both the Free and Paid versions. The paid version has extra features including IP blocking and that’s the main reason I put this plugin in last. You have to pay for the feature you need.
But I think it’s worth investing money on this plugin if you are getting tons of attacks daily because with this plugin you’re not only securing content from other countries but also it has complete security features. It’s for firewall, malware scan, blocking IP’s, live traffic monitoring, login security, and more.
Now there are tons of plugins in the market that does the same job or better than this. The only reason I put these plugins on this list because I already used and I must say these plugins might be a better choice when it comes to blocking the country’s IPs.
If you know any better plugin than these, let us know in the comment section. We’ll surely put your choice plugin on this list.