Docs

Cloudflare

Updated on

Cloudflare is a leading CDN service provider, offering Cache Rules to customize your caching settings. With Cache Rules, you can control what gets cached, set cache durations, and manage cache interactions.

In this documentation, we’ll show you how to exclude pages from Cloudflare CDN.

How to Exclude Specific Pages from Cloudflare CDN?

You can add rules to exclude pages from Cloudflare CDN. Cache Rules can be created in the dashboard via API or Terraform.

Here are the steps you need to follow: 

Step 1: Login to Cloudflare 

First, log in to the Cloudflare dashboard and select your account and domain.

Cloudflare login page for managing site caching

Step 2: Create a rule to exclude  

Go to Caching > Cache Rules. To create a new empty rule, select Create rule. 

Cloudflare rule setup to exclude pages from server cache

Enter a descriptive name for the rule in the Rule name and set the URI Path for the checkout page you want to exclude. You choose OR to enter multiple URI paths.

To exclude it in the Cache eligibility section, select Bypass cache. 

Cloudflare cache rule set to bypass cache for checkout pages

After making the changes, make sure to deploy. 

If you need help, you can contact their support team.