Exclude cron Url from cloudflare cache

How to exclude WordPress Automatic Plugin Cron URL from CloudFlare caching?

CloudFlare has become one of the most used services for caching and site speed optimization but its cache can harm how the plugin can function especially the corn job URL caching

The plugin cron job URL takes care of processing your waiting actions like processing waiting campaigns and importing new posts and if cached by CloudFlare, the corn will not be really triggered so here is how to exclude it from being cached by CloudFlare and there are two solutions one is easier than the other

The Easy solution: The first and easiest way is to disable caching for any URL containing parameters

  1. Visit your CloudFlare dashboard here https://dash.cloudflare.com/
  2. Below your caching menu, click Configuration

  3. Set the cache level to no query string

    This method will disable caching when the URL contains a query string so your corn URL will not be cached and all URLs from your site containing a query string so make sure that your post structure permalink is SEO optimized containing your post title and not just the simple ?p=number default permalink structure

The optimal solution: exclude the corn URL from Cloudflare cache

  1. From your CloudFlare dashboard click Cache Rules below Caching menu

  2. Set the Field to URI, the Operator to “Contains” and the value to “wp_automatic”

  3. click Deploy

Leave a Reply

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