Markdown answer without Vary: Accept
The page answers Accept: text/markdown with Markdown at its own URL, but that answer has no Vary: Accept header. A CDN or browser cache can store the Markdown and show it to the next visitor, or keep the HTML and give it to agents.
What it means
The page returns Markdown at its own URL when asked for text/markdown, but that answer has no Vary: Accept header. A CDN or browser cache can then show the Markdown to visitors.
Why it matters for AI search
Caches key a stored answer by its URL. Vary: Accept tells them that the answer depends on the Accept header, so they keep the HTML and the Markdown apart. Without it, whichever version was cached first is served to everyone.
The fault shows only now and then, when the first request after a cache purge came from an agent, so it is hard to notice from a browser.
How to fix it
- Add
Vary: Acceptto the Markdown answer, and to the HTML answer of the same URL. - Where the conversion runs in a CDN or a framework middleware, set the header in the same place.
- Purge the cache for the page after the change.
- Run "Check again" on the page report to confirm the result.
Example
# both answers of the same URL
Content-Type: text/markdown; charset=utf-8
Vary: Accept How to confirm the fix
After the change, press "Check again" on the report: it lists what was fixed and how the score changed.