WordPress Automatic Platform Optimization cache html with query strings


I am using WordPress Automatic Platform Optimization, and it works perfectly for URLs without a query string like https://www.domain.com/random/. These pages get cached and served to users which are not logged in.

For URL’s like https://www.domain.com/random/?sort=192 I get bypassed and sent to the origin server. headers:

Is it possible to cache those pages as well?

They’d have to hardcode that query string in to stop it from being bypassed. Given that it’s “sort”, I don’t think that’s a safe one to cache for all APO users.


1 Like

Thx for the quick reply. Just to be sure I fully understand… If I would use one of the query parameters in your url like “ref” In my example (https://www.domain.com/random/?ref=192), would Cloudflare serve a cached version of https://www.domain.com/random/?ref=192 or https://www.domain.com/random/

1 Like

That sounds like a clever workaround. Give it a try and let us know how it goes.

did not work :frowning:
Cloudflare cached:
instead of

What’s your Cache Level set to?



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