Canonical definition
Markdown Content Negotiation – Definition
Markdown content negotiation means a web page answers in Markdown instead of HTML when the client asks for it with the HTTP header Accept: text/markdown — same URL, different format.
In one sentence: Browsers get HTML; agents that ask for Markdown get clean text from the same address.
How it works
Every HTTP request carries an Accept header with the formats the client wants. Browsers ask for text/html. Some AI agents put text/markdown first. A server that supports negotiation looks at that header and picks the format:
GET /glossary/ HTTP/1.1
Host: angeo.dev
Accept: text/markdown, text/html;q=0.9
HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Vary: Accept
Three rules keep it correct:
- Answer in Markdown only when it is asked for, at least as strongly as HTML. A browser never sends
text/markdown, so it always gets HTML. - Always send
Vary: Accept. It tells caches that one URL has two versions. - Keep the same content. The Markdown is the page without menus, scripts and styles — not a different text.
Why agents ask for it
HTML pages carry navigation, scripts and layout code. An agent pays for every token it reads, so plain Markdown is cheaper and easier to quote. In February 2026 Cloudflare launched “Markdown for Agents”, which converts pages at the edge when the header asks for it, and Vercel serves its docs the same way. A Checkly test from the same month found that the fetch tool in Claude Code sends Accept: text/markdown, text/html, */*.
Negotiation, Markdown mirror and llms.txt
| How the agent finds it | What it gets | |
|---|---|---|
| Markdown content negotiation | Same URL, Accept: text/markdown header | One page as Markdown |
| Markdown mirror | A separate URL, usually ending in .md, listed in llms.txt | One page as Markdown |
| llms.txt | A fixed file at the site root | An index of the pages that matter |
They work well together. llms.txt tells an agent which pages exist; negotiation and mirrors give it each page in a clean format.
Pitfalls
- Caching. A page cache or CDN that ignores
Varycan send cached HTML to an agent — or, worse, Markdown to a browser. SendVary: Accept, and do not let shared caches store the Markdown version. - JavaScript-only pages. If the server never has the text, it cannot turn it into Markdown. Content must exist in the server response.
- Different text for agents. Adding facts that are not on the HTML page looks like cloaking. Convert, do not rewrite.
How to test it
curl -sI -H "Accept: text/markdown" https://angeo.dev/ | grep -i -E "content-type|vary"
curl -s -H "Accept: text/markdown" https://angeo.dev/glossary/ | head -20
You should see content-type: text/markdown and vary: Accept, and the page text without menus. angeo.dev answers this way on every page since December 2026.
Questions
Is Markdown content negotiation cloaking?
No, as long as the Markdown carries the same content as the HTML page. Search engines ask for HTML and get HTML. Only clients that ask for Markdown get Markdown.
Do I still need llms.txt?
Yes, they do different jobs. llms.txt is an index of your important pages. Negotiation delivers one page in a clean format when an agent fetches it.
Which agents send the header?
Some coding and research agents do, such as the fetch tool in Claude Code. Many crawlers do not. Keep your HTML readable without JavaScript as well.
Do site checkers test for it?
Some do. Hostinger’s AI visibility check gives 2 of its 100 points for “Markdown served on request”.
Check your own store. The free check shows what AI can read on your site. The AI visibility report shows what the assistants say.