Should Your Website Serve Markdown to AI Agents?
Shakewell ·
AI tools fetch web pages, and HTML is a noisy format for them: navigation, scripts and layout wrap the text. So a family of tools has appeared that serves a plain Markdown version of each page to agents instead. This post covers what those tools do, how the mechanism works, what is actually known about whether AI crawlers use the result, the risks, and what we would do now. We read every source on 29 November 2026.
Our short answer: serving Markdown is cheap and low risk if you do it by content negotiation, from the same content, with the caching right. It is not a proven way to rank or get cited, so treat it as a convenience for agents, not a marketing tactic.
What the tools do
Spatie’s laravel-markdown-response. Spatie’s README describes it as a way to “serve markdown versions of your HTML pages to AI agents and bots.” You wrap routes in a ProvideMarkdownResponse middleware, and the package converts the HTML response. The documentation lists three ways a request is detected as a Markdown request: an Accept: text/markdown header, a .md suffix on the URL, and known AI user agents. The default user agent list includes ClaudeBot, Claude-Web, Anthropic, PerplexityBot, Bytespider and Google-Extended, and you can add others such as GPTBot. Conversion runs locally by default, with an option to use Cloudflare Workers AI. Results are cached, with a default time to live of 3600 seconds. The install command is composer require spatie/laravel-markdown-response.
Cloudflare Markdown for Agents. Cloudflare announced it on 12 February 2026. When a client sends Accept: text/markdown, Cloudflare fetches the HTML from your origin, converts it at the edge and returns Markdown. It is opt-in per zone or by Configuration Rule, and Cloudflare’s documentation lists it as free on Pro, Business and Enterprise plans. In its announcement, Cloudflare cites its own article dropping from 16,180 tokens as HTML to 3,150 as Markdown, and names Claude Code and OpenCode as agents that already send the header.
The llms.txt proposal. Jeremy Howard’s proposal, published on 3 September 2024, asks sites to publish a Markdown file at /llms.txt that gives agents a curated entry point with links to detail. It also recommends that pages agents might need have a clean Markdown copy at the same URL with .md added, and that sites advertise it with rel="alternate" type="text/markdown". It is a proposal from one author, not a standard that crawler operators have adopted.
These overlap, but they are different things. Spatie and Cloudflare change how a page is served. llms.txt is a separate index file.
How content negotiation and user agent detection work
HTTP content negotiation lets a client state what format it wants in the Accept header. A browser asks for text/html. An agent that prefers Markdown asks for text/markdown. The server returns whichever it can produce, and says it varied the answer with a Vary: Accept response header, so caches keep the two apart.
The alternatives are weaker signals:
| Signal | How it works | Strength | Weakness |
|---|---|---|---|
Accept header |
The client asks for text/markdown |
Standard, explicit, easy to cache with Vary: Accept |
Only clients that send it benefit |
.md suffix |
/about.md returns Markdown |
Visible and testable, and the llms.txt proposal uses it | A second URL for every page |
| User agent | The server matches GPTBot, ClaudeBot and similar |
Reaches crawlers that do not send the header | The header is self-declared, lists go stale, and it is closest to cloaking |
Cloudflare’s own documentation warns that user agents in its analytics are client-supplied, so they are not verified bot identities. The same applies to any user agent check you write.
What is known about AI crawlers and Markdown
Very little is published, so here is what each vendor actually says.
| Source | What it says | What it does not say |
|---|---|---|
| Cloudflare | Claude Code and OpenCode send Accept: text/markdown; it invites “all AI crawlers and agents” to use Markdown; Radar tracks content types returned to AI bots |
Which crawlers act on the invitation |
| You do not need new machine readable files, AI text files, markup or Markdown to appear in Google Search, and Google Search “doesn’t use them” | Anything about other Google products or agents | |
| OpenAI | Lists OAI-SearchBot, GPTBot, ChatGPT-User and OAI-AdsBot and what each is for | Whether any of its crawlers request Markdown or send the Accept header |
| Anthropic | Lists ClaudeBot, Claude-User and Claude-SearchBot and what each is for | Anything about Markdown or the Accept header |
| Perplexity | Lists PerplexityBot and Perplexity-User and what each is for | Anything about Markdown or the Accept header |
We would draw three conclusions, and mark the last as our inference:
- Agents that fetch on behalf of a user may ask for Markdown. Cloudflare names two that do. OpenAI, Anthropic and Perplexity each describe a user-initiated agent, ChatGPT-User, Claude-User and Perplexity-User, but none says it sends the header.
- Nothing published says training or search crawlers prefer Markdown. The vendors that document their crawlers are silent on it.
- A Markdown copy is therefore a convenience for agents, not a lever on visibility. That is our reading of the sources above.
Backpack for Laravel’s maintainer, Cristian Tabacitu, wrote in October 2026 that llms.txt and an MCP server “didn’t move the needle for us”. His evidence is anecdotal, from one open source project’s documentation. He says what worked was information already in front of the agent, such as version-matched guidelines and readable source code. He also mentions switching on Markdown serving through Cloudflare, which he describes as a small, free win. We would not generalise from one site, but it is a useful counterweight to the hype.
The risks
Cloaking. Google’s spam policies define cloaking as “presenting different content to users and search engines with the intent to manipulate search rankings and mislead users”, and give inserting text only when the requester is a search engine as an example. Google’s AI guide does not discuss content negotiation. A Markdown copy of the same content, chosen by Accept, is a different representation of one page. The risk comes from letting the Markdown say something the HTML does not: extra claims, different prices, hidden instructions to AI tools. Keep them identical in substance.
Two versions drifting. Hand-written Markdown copies will go out of date. Generate Markdown from the same source as the HTML, or convert the rendered page. Conversion has limits: Cloudflare’s documentation notes that a full conversion outcome does not mean the HTML was preserved losslessly, and it strips navigation, headers and footers. Check that a price table, a legal notice or a form’s instructions survive.
Cache keys. If the same URL returns two formats, every cache between you and the client must key on the header. Cloudflare adds Accept to Vary. If you build it yourself, send Vary: Accept yourself. Matching on user agent would need Vary: User-Agent, which splits the cache by every bot string. Cloudflare also removes ETag and Last-Modified from converted responses, so conditional requests cannot be honoured for them.
Policy defaults. Cloudflare’s converted responses carry ai-train=yes, search=yes, ai-input=yes unless your origin sends its own content-signal header. If you do not want to signal that training is allowed, set your own first.
Private content. Do not convert pages that are personalised or behind a login. Cloudflare also caps conversion at 6 MiB of decompressed HTML.
What we would do
Cheap and safe now
- Make sure public pages are clean, server-rendered HTML with one H1, real headings, and tables as tables. Every converter works better on tidy source, and so do people.
- Decide in
robots.txtwhich crawlers you allow. OpenAI, Anthropic and Perplexity each publish crawler names for this. - If you are on a supported Cloudflare plan and your content is public, turn on Markdown for Agents for a section or the whole zone, after setting a
content-signalheader you are happy with. - If you run Laravel, use the Spatie package with
Acceptdetection and the.mdsuffix, and think twice about the user agent list. - Publish
/llms.txtonly if you want to. It costs little, and Google says it will neither harm nor help in Google Search.
Measure before you invest more
- In your logs or Cloudflare analytics, count requests that send
Accept: text/markdown, and which user agents make them. - Compare crawler requests for the HTML and Markdown versions, and watch for errors or partial conversions.
- Record referrals from AI products to the pages you converted, with a baseline from before the change. Without one, you cannot attribute a change to it.
Skip for now
- Serving different content by user agent.
- Hand-maintained Markdown duplicates of your site.
- A docs-only MCP server or a rewrite for “AI visibility” on the strength of hype. Backpack’s experience is the cautionary tale.
- Any claim to a client that Markdown serving will raise rankings or citations. Nothing published supports it.
If you want help working out where AI tools fit across your content and systems, our AI consulting page describes how we scope that.
Sources: Spatie laravel-markdown-response on GitHub, Spatie documentation, Cloudflare Markdown for Agents documentation, Cloudflare announcement, llms.txt proposal, Backpack for Laravel article, Google guide to generative AI features, Google spam policies, OpenAI crawlers, Anthropic crawler support article and Perplexity bots, checked 29 November 2026.
Common questions
Do AI crawlers request Markdown versions of web pages?
Some AI agents do. Cloudflare says popular coding agents such as Claude Code and OpenCode send an Accept: text/markdown header. OpenAI, Anthropic and Perplexity do not say in their crawler documentation whether their training or search crawlers ask for Markdown, so that part is unknown.
Does serving Markdown improve search or AI citations?
There is no published evidence that it does. Google's guide to generative AI features says you do not need to create new machine readable files, AI text files, markup or Markdown to appear in Google Search. No other vendor has published a claim that Markdown changes ranking or citation.
Is serving a different version to AI bots cloaking?
Google defines cloaking as presenting different content to users and search engines with the intent to manipulate search rankings and mislead users. A Markdown copy of the same content, chosen by an Accept header, is not that. Serving different facts to a bot than to people, chosen by user agent, is the pattern to avoid.
What is Cloudflare Markdown for Agents?
An opt-in feature, launched on 12 February 2026, that converts a page's HTML to Markdown at Cloudflare's edge when a client sends Accept: text/markdown. It is free on Pro, Business and Enterprise plans. The converted response carries Vary: Accept and a default content signal that allows AI training, search and AI input unless your origin sends its own.
Do we need an llms.txt file?
No. Google says Google Search ignores llms.txt files and that creating one will neither harm nor help your visibility there. It is cheap to publish if you want to, but there is no evidence it changes what AI products cite, and Backpack for Laravel reported that it barely helped them.