Cloudflare has shipped support for the Vary header in Cache Rules, addressing what the company calls the ugliest part of HTTP. The change is available on every plan, not just Enterprise tiers, and gives developers explicit control over how responses that differ by request headers are cached and served.
Historically, Vary is difficult to handle because a single response can be valid only for a specific combination of request headers, such as Accept-Encoding, Accept-Language, or User-Agent. Cache engines that ignore it can serve the wrong variant; engines that honor it naively can fragment cache keys and tank hit ratios. Cloudflare's new controls let you choose a strategy per rule instead of accepting one global behavior.
- Normalize known negotiation headers so equivalent values collapse to one cache key before lookup.
- Pass exact header values through to the origin when small differences genuinely matter to the response.
- Bypass cache entirely when the variation is too unpredictable to model safely.
These options live in Cache Rules, the same ruleset engine used for cache eligibility, TTL, and cache key customization, so Vary handling composes with existing rule expressions rather than requiring a separate configuration surface. The feature also works alongside Cache-Control, CDN-Cache-Control, and cache key normalization already offered by Cloudflare.
For developers, the practical win is fewer correctness bugs and fewer stale or mismatched responses at the edge. APIs serving content negotiation, sites with localization or device-specific output, and services that vary on custom headers can now express that intent declaratively. It also reduces the need for origin-side shims or overly broad cache bypasses that previously sacrificed performance for correctness.