Create a cache rule in the dashboard
- Log in to the and select your account and domain.
- Go to Caching > Cache Rules.
- Select Create rule.
- Enter a descriptive name for the rule in Rule name.
- Under When incoming requests match, define the . Use the Field drop-down list to choose an HTTP property and select an Operator. Refer to for the list of available fields and operators.
- Following the selection of the field and operator, enter the corresponding value that will trigger the Cache Rule. For example, if the selected field is
Hostnameand the operator is
equals, a value of
cloudflare.comwould mean the rule matches any request to that hostname.
- Under Then, in the Cache status section, select if you want matching requests to not be cacheable, or Eligible for cache if you want Cloudflare to attempt to cache them. Note that can also impact cache eligibility.