Cloudflare Docs
Rules
Rules
Visit Rules on GitHub
Set theme to dark (⇧+D)

Origin Rules (beta)

Origin Rules allow you to customize where the incoming traffic will go and with which parameters. Currently you can perform the following overrides:

The Origin Rule expression will determine when these overrides are applied.

​​ Availability

FreeProBusinessEnterprise
Number of Origin Rules102050100
Host header overrideYes
Resolve overrideYes
SNI overrideYes
Destination port overrideYesYesYesYes

​​ Important remarks

If you override the hostname with an Origin Rule (via Host header override or resolve override) and add a header override to your load balancer configuration, the Origin Rule will take precedence over the load balancer configuration.

Unlike Page Rules, an Origin Rule performing a Host header override will not automatically update the SNI value of the original request. To also change the SNI value, add an SNI override in the same Origin Rule or create a separate Origin Rule for this purpose.