CloudFlare Ban Country

  1. Home
  2. Docs
  3. CloudFlare Ban Country
  4. CloudFlare Ban Country Installation

CloudFlare Ban Country Installation

This plugin ban entire country from visiting your website. This is useful if you got an attack / ddos by specific country. You must use Cloudflare to use the feature. How to use:

  1. Download plugin here: cloudflare-ban-country
  2. Login to WordPress, Plugins -> Add New -> Upload New Plugin
  3. Activate
  4. Go to Plugin Editor, and Edit Cloudflare Ban Country -> plugin.php, Change to your desired countries, default is China:
    // Put banned countries here
    $banned_countries = [
    Example if you want to ban US and India:

    // Put banned countries here
    $banned_countries = [

  5. Save Changes

That’s all and banned country will get message 403 forbidden.

Was this article helpful to you? Yes 2 No