Infrastructure, domains & the recurring invoice of civilisation

The Hosting Ledger

Sharp briefings on web hosting, internet domains, cloud infrastructure and the fragile plumbing of being online.

Cloud

Cloudflare Adds Vary Support to Cache Rules

September 23, 2026 · admin
Cloudflare Adds Vary Support to Cache Rules

Cloudflare has added support for the HTTP Vary response header in Cache Rules, giving site operators a more precise way to cache pages and assets that legitimately differ by request header.

The company said the feature is available on every plan. Origins can still send Vary to identify request headers that may change a response, but Cloudflare customers can now decide how the edge handles those fields: normalize known negotiation headers, pass exact values through where every distinction matters, or bypass cache when a variant would be too unpredictable.

That matters for hosting customers because Vary is a common source of cache misses and hard-to-debug wrong-response incidents. A single URL may need to serve different content types, languages, image formats, or compression choices. If a CDN ignores the variation, the wrong representation can be served. If it treats every raw header value as unique, cache entries can fragment and push more traffic back to origin servers.

Cloudflare’s post frames the change as a way to keep correctness while reducing unnecessary cache-cardinality blowups. For example, many Accept-Language strings can map to a small number of supported site languages, and many browser negotiation headers can be normalized into a smaller set of responses.

For web hosts, agencies, and larger WordPress or ecommerce operators, the practical takeaway is to review whether origin applications emit Vary on headers such as Accept, Accept-Language, Accept-Encoding, cookies, or user-agent. Cloudflare’s new controls may allow safer CDN caching for multilingual pages, format-negotiated assets, APIs sharing URLs with browser views, and other workloads that previously forced conservative bypass rules.

The feature is most useful when teams understand their application’s real variants. High-cardinality fields such as cookies and user-agent strings can still destroy cache efficiency if passed through blindly, so operators should test hit ratios and response correctness before widening cache coverage.

Source: Cloudflare Blog — “We just shipped support for the ugliest part of HTTP: Vary”.