Defender by Played lets you block visitors based on their country of origin.
The plugin contacts the free service at freegeoip.net and sends the visitors IP adress to that service to geolocate that IP adress so that the visitors country can be pinpointed and compared to a list of blacklisted countries.
Visitors entering your site from a blacklisted country can then be redirected to either the WordPress 404 page, a custom page that you set up yourself, or it can simply just return a 403 Forbidden header.
- Unpack the .zip file and upload the
defenderfolder to the
- Activate the plugin through the ‘Plugins’ menu in WordPress
Pluginsin the admin menu click the
- Select countries to blacklist and a redirect option.
- Be careful with the
block login pageoption, as blocking the login page from users coming from certain countries could lock you out if your own country is blacklisted.
Fatal error: Cannot use object of type WP_Error as array in /home/user/site.ext/ wp-content/plugins/defender-by-played/defender.php on line 75