Best Free WordPress Plugin to Block Countries

I have been searching on the Internet for a while to get the Best Free WordPress plugin to block countries. Finally, after testing a bunch of IP blockers and Country blockers I arrived at my final verdict.

As Digital Marketer but also an emphatic user-friendly supporter, I wanted to find a WordPress plugin able to block any Country with the following characteristics:

  • Easy to install
  • Easy to set up
  • Easy to update

Did I ask too much from this? In the end, this should be bread and butter for everyday WordPress plugin but, still nowadays is not.

What I found is called IP2Location Country Blocker. In my opinion the name is something maybe to revise, but at the end, the important is to install it and make it run. This plugin basically allows you to set up what Countries you want to include or exclude from visiting your website. The logic is the following:

a) Traffic is enabled to all countries, with the exception of XXX

b) Traffic is disabled to all countries with the exception of XXX

In my case, I have few clients who provide local service in Dublin, so they don’t really give a damn to be visited from America or China. Also because nowadays websites are visited by spam bots and other dodgy shit. So I don’t need them to visit my website.

Another reason, if you have limited resources in your server, let’s say you have a cheap hosting with limited bandwidth, you can avoid being overcharged for traffic you didn’t need, also your database will work only on genuine requests from real users, making it quicker.

How to install IP2Location Country Blocker

You can go to your dashboard and then click on Plugins > Add New. Then type the name above. Once you see the plugin like this

IP2Location country blocker plugin

You just need to click on Install, the once installed press Activate. In my case above you see it shows as active.

What settings you have to do with IP2Location Country Blocker?

FIRST STEP

One important thing first is to have installed an updated database of IP addresses. If the plugin tells you that is not updated, just go to this website https://lite.ip2location.com/ and see a section called “Free databases for download”. I usually select the most completed one (it is free anyway) but not the best completed one. My choice is the DB5 LITE. Once you have downloaded the zip file, you have to unzip and extract the file called IP2LOCATION-LITE-DB5.bin and upload into your remote website folder where the plugin is installed. Usually is:

/wp-content/plugins/ip2location-country-blocker

You may have another folder path before the wp-content but once you go to your root location, you can see the same path. Once you uploaded, you basically got the latest version. If in 6 or 12 months you get a notification in your WordPress dashboard that the file needs to be updated, please follow the same instructions above.

SECOND STEP

When you are in this plugin area, click on the setting tabs. Ensure that you have selected
IP2Location Lookup Mode to be Binary Database. If you select the web service, you have to register and pay. If you stay on Binary database, you just need to update it manually every now and then but it is free. I don’t use the IP2Proxy Lookup mode.

Going down the settings, you see that there is another option to download the database using a Token. You get the token if you register to their website, but, sometimes it doesn’t work, meaning that you may get an error telling that you are unable to download the database. So if you do manually it much practical.

Now you set up the Country Blocker in your WordPress website, you need to tell this plugin what rules you want to apply either for Front End (the pages user see in your website) or Back End (when you go to your dashboard in WordPress). You can set up one or both. Be sure to set up the country correctly, otherwise, you will be kicked out from your own website and then you have to spend the time to get it back fiddling into your database Apache.

My set up is the following

IP2 country IP Blocker control panel

As you can see I blocked all countries with the exception of Ireland, etc, etc. Also be sure you select DO NOT BLOCK the bots such as Bing, Google, etc. If you have a website where a user can login, you might also want to repeat the same set up in the Backend tab. Once again, double check that the Country you are blocking is not your country otherwise you are kicked out from your own website.

This is all you need to know about this plugin and how to install it. After some time, you can go to the tab Statistic and you can see the volume that has been blocked.

I hope you found this post helpful and you also found this plugin easy and useful. I am not endorsed by the authors or owners of this plugin. I just thought it is interesting to bring it to your attention.

Leave a Reply

Your e-mail address will not be published. Required fields are marked *