Cache localized Cloudflare pages without splitting every URL

Cloudflare Docs changelog preview image for CDN and developer updates.Cloudflare Docs
Cloudflare Docs changelog preview image for CDN and developer updates.Cloudflare Docs
Tools & Apps

Cloudflare Cache Rules now honor the HTTP Vary response header, letting teams cache multiple variants of the same URL by headers such as Accept-Language or Accept.

Cloudflare Cache Rules now support the HTTP Vary response header for multiple cached versions of the same URL. Confidence level: confirmed for Cloudflare's July 2, 2026 changelog and docs. The practical change is that multilingual pages, format variants, and other negotiated responses can stay cacheable instead of forcing teams to split URLs or bypass cache.

Cloudflare changelog preview image
Cloudflare Docs changelog preview image for CDN and developer updates. Source: Cloudflare Docs.

What changed

Cloudflare says Cache Rules can now honor an origin's Vary response header. If the origin returns a response such as Vary: Accept-Language, Cloudflare can store separate cached variants of the same URL and select the right one based on the matching request header.

The feature targets a familiar CDN problem: one route can legitimately return different content. Examples include localized HTML selected by Accept-Language, API or page responses selected by Accept, and compression-sensitive behavior around Accept-Encoding.

Header patternCloudflare action to considerBest fitRisk to check
Accept-LanguagenormalizeLocalized pages where equivalent language headers should collapseWrong locale if origin logic differs from normalized value
Acceptnormalize or passthroughHTML, JSON, or format negotiation on one URLToo many variants if raw values are noisy
Accept-Encodingnormalize with strong ETag careCompression-aware cachesBehavior depends on Cloudflare compression and ETag settings
Per-user or high-cardinality headersbypassAuth, personalization, experimentsAccidentally caching private or fragmented responses

Why this is early

This is an official Cloudflare platform update, not a rumor. It is early because teams may only notice the effect after a cache rule is configured and origin responses start producing multiple cache entries for one URL.

The primary source is Cloudflare's July 2 changelog. Cloudflare's Vary documentation explains the mechanics, while RFC 9111 provides the HTTP caching standard context for how caches use the Vary header to select stored responses.

Key takeaways

  • Cloudflare Cache Rules can now store multiple cached versions of one URL based on the origin's Vary header.
  • The origin response must include Vary; configuring the rule alone does not vary every cached response.
  • Cloudflare offers three actions for varied headers: normalize, passthrough, and bypass.
  • normalize can improve cache hit ratio by collapsing semantically equivalent header values.
  • Vary: * bypasses cache, matching standard HTTP behavior.

Availability and access

Cloudflare says Vary in Cache Rules is available on Free, Pro, Business, and Enterprise plans. Teams can configure it in the Cloudflare dashboard under Cache Rules or through the Rulesets API.

For Workers subrequests, Cloudflare points developers to cf.vary. That matters for apps where the edge function, not only the origin server, decides which request headers should participate in cache selection.

Practical LinkLoot angle

This is most useful when your current workaround is ugly: separate URLs for each language, cache bypass for negotiated pages, or custom Workers code just to keep variants apart. With the new Cache Rules support, the origin can keep one canonical URL and let Vary express which request headers matter.

Use this checklist before enabling it:

  1. Pick one route group, not the whole site.
  2. Confirm the origin returns the right Vary header only when needed.
  3. Start with normalize for Accept or Accept-Language unless exact raw bytes matter.
  4. Use bypass for per-user, session, experiment, or highly variable headers.
  5. Purge affected URLs after changing Vary configuration, because old cached entries may otherwise age out naturally.

For teams using AI or automation to maintain edge configuration, LinkLoot's AI workflow automation guide is the useful companion: let automation surface affected routes, but keep cache-key and privacy decisions reviewed by a human.

What to verify before you act

  • Confirm which routes already return Vary and whether the header is intentional.
  • Test language and format variants with real request headers before enabling broad caching.
  • Watch cache hit ratio and origin error rates after rollout.
  • Check that private, authenticated, or per-user responses are not cached under a shared key.
  • Document purge behavior, because Cloudflare says purging a URL purges all cached versions for that URL.

Source check

Confirmed by:

  • Cloudflare's July 2, 2026 changelog says Cache Rules now support the origin Vary response header and lists normalize, passthrough, and bypass behaviors.
  • Cloudflare's Vary cache documentation explains when headers become part of the cache key, when Vary: * bypasses cache, and how purge behavior works.
  • RFC 9111 documents the HTTP caching model for selecting stored responses with the Vary header.

Early signal / context:

  • This is a fresh Cloudflare CDN capability. LinkLoot will treat Cloudflare examples, dashboard changes, or Workers-specific follow-up docs as update triggers, not as reasons to overstate today's release.
FAQ

Cloudflare Cache Rules can now honor the HTTP Vary response header, so one URL can have multiple cached variants selected by request headers.