Easiest Way Of Blocking Visitors From Selected Countries Or Targeting Specific Countries For Traffic In WordPress

Although there are many WordPress plugins, hacks and other cPanel tricks that allows you to block visitors on some defined conditions. Here is an easiest way of blocking visitors from selected countries and it is the best method if you want to target traffic from a specific country or region.

Defender is the new WordPress plugin that offers you an easy admin area features to do so. Install and activate it, upon activation visit your Dashboard -> Plugins -> Defender page and you will be seeing the following screen.

Countries Blocker for WordPress

Now you just have to select countries from Whitelisted countries list and click the Add button, it adds the selected country to Blacklisted countries list. You can reverse the action by again selecting the county from Blacklisted countries list and clicking the Remove button.

Other than this you can redirect blocked countries requests coming from users to to Wordpress 404 page, Send a 403 Forbidden or simply create a custom page by editing the “blocked.php” file present in this plugin directory.

You can also block WordPress login page but remember: one very important thing, the plugin could lock you out from WordPress if you blacklist your own country, on the other hand, leaving it unchecked does not block any users from the login page. The plugin  uses geoloaction based on the visitors IP-address.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.