Cache Level “Ignore Query String” seems not to work

Cache Level “Ignore Query String” do not work. I have a couple rules configured, see the first ones in attached screenshot. Based on the 5. rule (www.diet-health.info/es/recetas/re/* Cache Level: Ignore Query String, Edge Cache TTL: a day, Bypass Cache on Cookie: _identity) the following URL should be cached:

https://www.diet-health.info/es/recetas/re/rvptl90-erb-muesli-sin-lactosa-sin-gluten-vegano-crudista

However, the page is server by the origin, I see it in my apache log and also from the HTTP header:

cf-cache-status: DYNAMIC
cf-ray: 693b0402c98768c1-BUD

But if I change the Cache Level from “Ignore Query String” to “Cache Everything” it is cached correctly and in the HTTP header I see “cf-cache-status: HIT”.

Cloudflare does not cache HTML by default. So setting “Ignore query string” or “No query string” does not affect the behavior of serving the HTML content.

Anyway, if you want to achieve the same “Ignore query string” behavior but you still want to cache the HTML page, then you can refer to this:

Basically uses Transform Rules to rewrite (remove) the query string while having a page rule to Cache Everything.

1 Like

Thanks. That seems to be the solution.

1 Like

I have a couple rules configured, see the screenshot:


The 5. rule is:

www.diet-health.info/es/recetas/re/*
Cache Level: Ignore Query String, Edge Cache TTL: a day, Bypass Cache on Cookie: _identity

The URL Erb-Muesli: sin lactosa, sin gluten (vegano, crudista) (es) is served always by the origin and the in the HTTP header I see:

cf-cache-status: DYNAMIC
cf-ray: 693b0402c98768c1-BUD

However if I set Cache Level to “Cache Everything”, the page is cached correctly, and in the header the cf-cache-status is getting HIT.
But I want to ignore URL parameters, because of Google’s gclid (Google Click ID) parameters, which makes every calls unique,

This is a duplicate of

and the solution is there.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.