Requirements

  • Cloudflare Account and domain added

Procedure

Example #1

  1. Login to your Cloudflare account
  2. Select the domain for which you want to set Page Rules
  3. Tap on Page Rules Option on Above bar and tap ‘Create Page Rule’ Button
  4. Inside URL TextBox Enter
    http://www.domain.tld/*
  5. Set the rule settings to “Always HTTPS”. This will force your every webpage, subdomain to redirect to HTTPS.
  6. Save and Deploy

Example #2

Adjust Cache level using Page Rules

Similarly, you can disable “Cache Level” for some of the pages on your website like wp-admin and wp-login.php pages of the WordPress website.

For disabling cache for wp-admin panel follow steps #1 to #4 above first followed by below steps.

  1. Inside URL TextBox Enter
    https://www.domain.tld/wp-login.php*
  2. Set the rule settings to “Cache Level”  and in next field “Bypass”
  3. Save and Deploy
  4. Similarly, create another page rule for URL and save to deploy.
    https://www.domain.tld/wp-admin/*

Note – The Free plan under Cloudflare allow 3-page rules.

Leave a Comment

Your email address will not be published. Required fields are marked *