Website Spec
← Performance
Recommended

No-Vary-Search response header

The `No-Vary-Search` response header tells browsers and caches that some URL query parameters (tracking, UTM, sort order) do not change the response. The cached entry for the canonical URL is reused for variants — fewer fetches, better prefetch hits, less duplicate work.

What it is

No-Vary-Search is a response header that tells the browser's HTTP cache (and the Speculation Rules prefetch/prerender cache) which URL query parameters are irrelevant to the response. By default, every distinct query string is treated as a distinct resource. No-Vary-Search lets the server say "the response for /products?utm_source=x is identical to the response for /products" without redirecting.

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
No-Vary-Search: params=("utm_source" "utm_medium" "utm_campaign" "utm_term" "utm_content"), key-order

The directives are small and precise:

Why it matters

How to implement

No-Vary-Search: params=("utm_source" "utm_medium" "utm_campaign" "utm_content" "utm_term"
                        "gclid" "fbclid" "msclkid"), key-order

This site ships it. specification.website sets No-Vary-Search on every response via public/_headers, covering the common UTM parameters plus gclid, fbclid, msclkid, mc_cid, mc_eid, and ref, with key-order so parameter ordering is also ignored.

Common mistakes

Verification

Sources