← Back to all Easy Critical CSS docs
If your site uses Cloudflare, you will need to adjust a couple of settings so Easy Critical CSS can work correctly. Cloudflare must allow the Easy Critical CSS Generator to access your site in order to create your Critical and Secondary CSS with the unused CSS removed, and it must also allow the generator to send the finished CSS back to WordPress. The steps below make sure both parts work as expected.
Set up Cloudflare to clear cache correctly
- In your WordPress admin, go to Settings > Easy Critical CSS and click the Show Advanced Settings button.
- Enter your Cloudflare account email address in the Cloudflare Email field.
- Retrieve your API key and enter it in the Cloudflare API Key field.
- Find your Zone ID by selecting the three dots next to your domain on the Cloudflare Account Home page. Enter that Zone ID in the Cloudflare Zone ID field.
- Save your settings.

Allow CriticalCSS.net to deliver generated Critical CSS
- Go to Security > WAF > Custom Rules > Create Rule.
- Enter a rule name. For example, “Allow Easy Critical CSS API”.
- Set the expression to:
(http.user_agent contains "EasyCriticalCSS Generator") - Set the action to Skip.
- Deploy the rule.
