Origin Rules API parameter reference
Last updated Apr 16, 2026
Create different overrides by including different action parameters in the action_parameters field:
| Override type | What to include |
|---|---|
| Host header override | host_header parameter |
| SNI override | sni object |
| DNS record override / Destination port override | origin object |
Note
The same origin rule can have different types of overrides. Refer to Configuring several overrides in the same rule for a syntax example.
Host header override parameters
The full syntax of the action_parameters field for overriding the HTTP Host header is the following:
"action_parameters": {
"host_header": "<HOST_HEADER_VALUE>"
}
SNI override parameters
The full syntax of the action_parameters field for overriding the SNI value of incoming requests is the following:
"action_parameters": {
"sni": {
"value": "<SNI_VALUE>"
}
}
DNS record override and destination port override parameters
The full syntax of the action_parameters field for overriding both the hostname and the destination port of incoming requests is the following:
"action_parameters": {
"origin": {
"host": "<HOSTNAME>",
"port": <PORT>
}
}
If you are only overriding the hostname or the port, omit the port or host parameter, respectively.
Configuring several overrides in the same rule
The same origin rule can have different types of overrides. For example, a single origin rule can perform an HTTP Host header override and a destination port override. The syntax of such a rule would be the following:
"action_parameters": {
"host_header": "<HOST_HEADER_VALUE>",
"origin": {
"port": <PORT>
}
}
Was this helpful?
YesNo
On this page
{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/rules/origin-rules/parameters/#page","headline":"Origin Rules API parameter reference","description":"Configurable parameters for origin rules.","url":"https://developers.cloudflare.com/rules/origin-rules/parameters/","inLanguage":"en","image":"https://developers.cloudflare.com/rules/origin-rules/parameters/og.png?v=ee32d4229e06534a","dateModified":"2026-04-16","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}
description: Step-by-step tutorials for common origin rule configurations. title: Origin Rules tutorials image: https://developers.cloudflare.com/rules/origin-rules/tutorials/og.png?v=e6f666ad68722404
Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/rules/llms.txt
Use this file to discover all available pages before exploring further.
Docs