Do page rules override previous one in the order?

I have the following page rules:
[1] www.domain.tld/_nuxt/* → Cache Level is Cache everything
[2] www.domain.tld/* → Cache Level is Bypass

I guess page rules are prioritized as per their rank i.e. 1 will be implied before 2.
I need to make sure only the content in “_nuxt” directory is cached and everything else is bypassed. Are the rules above correct for that or the 2nd rule which says bypass everything will override the first one?

I tried that out and apparently it doesn’t override as the cf-cache-status header was “HIT” only on items in _nuxt directory. Though I would like to confirm if that’s perfect for the use case.

Thank you.

Hi @Dharmaraj,

Yes, that should work. Only one page rule will fire on a URL so you should put the most specific rules at the top and the more general ones at the bottom.

1 Like

Great! So the URIs starting with _nuxt/ will follow only the first rule.

Thanks for the quick reply! :+1:t2:

1 Like

Yes :+1:

No problem!

1 Like

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