Caching Everything Page Rule doesn't work if you have another redirect page rule before it

I am on a free Cloudflare plan. I have a redirect page rule setup for one of the pages before the Cache Everything page rule, in this scenario Cache everything isn’t working. But, if I place the Cache everything page rule before the redirect page rule, then it works but the redirect page rule doesn’t. I am in a tough situation, any suggestions.

I’m a bit fuzzy if Page Rules will loop back around on the second hit after a redirect. It sounds like it won’t.

One option would be to add the redirect on your server.

This is that way by design. The redirect however does not require caching so it should be fine being first. Can you post a screenshot of the two rules?

1 Like

With a redirect rule the user is being redirected to another page/URL so there is nothing to cache. The caching should be done for the target of the rule. If I have a rule which says → 301 redirect → the only response a user gets when they visit is a 301 which tells their browser to make another request to the new URL. The browser makes that second call directly, Cloudflare isn’t doing it on their behalf.

If you want to cache once they have been redirected you would create a rule to cache that.

1 Like

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