iQ Block Country Plugin

for WordPress

The WordPress plugin that blocks countries for you.

Get It Blocked!

iQ Block Country is a WordPress plugin that allows you to block visitors based on from which country they are from or which IP address they are from.

This plugin is tested up to the latest WordPress version, there are no guarantees that this version will work on (much) older versions, there however so far have no issues been reported on older versions.

Latest version: 1.2.24

If you would like to contribute or donate to this plugin please visit this page.

Allow IP addresses / ranges

Despite blocking an entire country you might want to allow access to a certain IP address or an IP range so visitors from that IP address(es) can still visit your frontend and/or backend.

Block unwanted countries

Wheter you want to block bad countries that harras your site or just want to allow your website to countries that you for instance sell to iQ Block Country is the plugin for you.

Logging

You can view logging of blocked off attempts to check where they are from and which page(s) they wanted to visit.

What is iQ Block Country

iQ Block Country is a plugin for WordPress that allows you to limit access to your website content. You can either allow or disallow visitors from defined countries to (parts of) your content.

For instance if you have content that should be restricted to a limited set of countries you can do so. If you want to block rogue countries that cause issues like for instance hack attempts, spamming of your comments etc you can block them as well.

Do you want to secure your WordPress Admin back-end site to only your country? Entirely possible! You can even block all countries and only allow your own IP address.

And even if you block a 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.

You can show blocked visitors a message or you can redirect the visitors to an external website.

You can (dis)allow visitors to blog articles, blog categories or pages or all content.

Stop visitors from doing harmful things on your WordPress site or limit the countries that can access your blog. Add an additional layer of security to your WordPress site.

This plugin uses the GeoLite database from Maxmind. It has a 99.5% accuracy so that is pretty good for a free database. If you need higher accuracy you can buy a license to use the Geo Country database from MaxMind directly.

If you cannot or do not want to download the GeoIP database from Maxmind you can use the GeoIP API key available on this website. All your requests for IP to country conversions are done by our servers.

If you want to use the GeoLite database from Maxmind you will have to download the GeoIP database from MaxMind directly and upload it to your site.

The WordPress license does not allow this plugin to download the MaxMind Geo database for you.

 

Using iQ Block Country with a caching solution

 

Please note that many of the caching plugins are not compatible with this plugin. The nature of caching is that a dynamically build web page is cached into a static page.
If a visitor is blocked this plugin sends header data where it supplies info that the page should not be cached. Many plugins however disregard this info and cache the page or the redirect. Resulting in valid visitors receiving a message that they are blocked. This is not a malfunction of this plugin.

Disclaimer: No guarantees are made but after some light testing the following caching plugins seem to work: Comet Cache, WP Super Cache
Plugins that do NOT work: W3 Total Cache, Hyper cache, WPRocket

Warning: Caching & Geo Blocking do not work well together.

While some caching solutions might work in combination with GeoBlocking it does not mean it works great.

In the best case scenario countries or IP’s you want to block get served a page from cache and when visiting non cached pages they get blocked. This is due to the fact when pages are served from cache the iQ Block Country plugin does not get started and can’t do it’s job.

If the caching plugin however ignores the caching headers you risk the chance that the block message gets cached and everyone gets to see they are blocked even the countries that you did not block.

If you’re fine with blocked countries getting served the page from cache then you’re fine using the iQ Block Country plugin.

If you’re not you should disable either the cache or the Geo Blocking. Or search for another solution outside WordPress (for instance by using the Varnish software) where you can GeoBlock at a caching level.

iQ Block Country GeoIP API

For your convenience we offer a GeoIP API service. This API is not mandatory to use as you can always use the free MaxMind GeoIP Database.

If you do not want or can’t go through the hassle of updating your MaxMind GeoIP database we provide an API service to convert the IP address of your visitors to a country.

If you decide to purchase an GeoIP API Key via this website you’ll get an eMail with your API Key (License Key), if you register an account at our website you’ll always be able to see your license key.

Once you enter this key in your iQ Block Country settings your license key will be validated and activated at our license server and the nearest API server to you will be chosen. To do this your website will contact all API servers once to request
an empty file.

Once you use the API service the IP address of your visitors and your API key are send to one of the API servers and converted to a country. The plugin checks if the visitor should be blocked based on that country or not.

  • What is logged on our end?
    Upon validation/activation of your license key your request will be logged in our webserver logs. The data send is the IP address of the server your website is hosted on, Your API key and your website URL.
  • Upon checking an IP address of your visitor this IP address is only used to convert it to the country it belongs to and is not logged. We have no way to link a visitors IP address to your website.

What is logged is your API Key and the Website URL making the request.

If you decide to purchase the GeoIP API key your chosen payment solution will be charged once or if you have chosen so on a yearly basis.

Privacy policy regarding this service specific can be found here.

Ready To Get Started?