Ignore query string does not look to work

#1

Hi,

I have a website that runs on Google Ads and because of that, google always ads ?gclid=XXX to my URL (XXX is random string).

The problem is that I tried using IGNORE QUERY STRING (create a page rule that matched *example.com/*gclid*) but checking HTTP response headers, it is clear that the HIT header never shows up.

I am a programmer for 12 years and fully understand caching/headers/response… and I am not doing anything stupid. However I am not used to CloudFlare and I must be doing something stupid related Cloudflare configuration.

PS: I cant use worker for this website cause this customer cant afford that cost.

#2

While set to “ignore query string” or “standard” caching, Cloudflare will only cache these file extensions (ie. it will never cache HTML). Unfortunately, this means you cannot use “Cache Everything” in conjunction with “ignore query string”.

Sadly i’m not sure of a viable solution to this problem that doesn’t include Workers. When I encountered it, I renamed the resource to end in .js, but that is not a great solution long-term. Maybe others in the community know of a way.

#3

I cant believe cloudflare does not provide a solution to this that does not involve workers. Why “ignore query string” only works on static files? I see no reason why they dont allow us to override that ;(

closed #4

This topic was automatically closed after 31 days. New replies are no longer allowed.