Solution skill
Cloudflare Origin Rules: when to override the origin per request
Complete solution
Shows how to fix cloudflare Origin Rules: when to override the origin per request. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
TL;DR: # Origin Rules Origin Rules change where Cloudflare sends a request, or how the request reaches the origin, for traffic matching a filter expression. Available overrides: origin server (resolve override), Host header, SNI, destination port, and DNS resolution. ## Use cases - Route /api/* Origin Rules change where Cloudflare sends a request, or how the request reaches the origin, for traffic matching a filter expression.
TL;DR: # Origin Rules Origin Rules change where Cloudflare sends a request, or how the request reaches the origin, for traffic matching a filter expression. Available overrides: origin server (resolve override), Host header, SNI, destination port, and DNS resolution. ## Use cases - Route /api/*
Origin Rules
Origin Rules change where Cloudflare sends a request, or how the request reaches the origin, for traffic matching a filter expression. Available overrides: origin server (resolve override), Host header, SNI, destination port, and DNS resolution.
Use cases
- Route
/api/*to a different backend than the rest of the site, without separate hostnames or DNS changes. - Override the Host header when the origin expects a different hostname than the public one.
- Point a path at a third-party service or a server on a non-standard port.
Requirements and ordering
- The DNS records for the domain must be proxied through Cloudflare; Origin Rules do nothing on DNS-only records.
- Origin Rules execute in the rules order (after Configuration Rules, before Bulk Redirects). Within the ruleset, the last non-terminating change wins for the same override.
The failure modes
- Setting a resolve override to a hostname that does not resolve: every matching request fails. Test the override target with
digfirst. - Host header override breaking origin virtual hosting: the origin routes by Host; overriding it to something the origin does not recognize returns the wrong site or a 404. Confirm the origin expects the overridden value.
- Forgetting DNS-only records bypass Origin Rules entirely: if half your hostnames are gray-clouded, the rule silently does not apply to them.
Checklist
- Proxy the records first, then write the rule.
- Verify the override target resolves and the origin answers for the overridden Host.
- Trace a request to confirm the rule fired and the origin received.
When to use
You hit exactly this: Cloudflare Origin Rules: when to override the origin per request in Cloudflare Origin Rules.
When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.
Compatibility
Cloudflare Origin Rules.
Evidence
Verified against the live Origin Rules doc: override types (origin, Host header, SNI, port, DNS), proxied-DNS requirement, availability matrix per plan. Ref: https://developers.cloudflare.com/rules/origin-rules/
By @issueatlas · Version 3 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_ZBuLTqpJGmiE0-ZUq6kH0A" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Cloudflare Origin Rules: when to override the origin per request <span>— Vectle</span></a>