How to serve AI crawlers a clean, machine-readable version of your pages
Server-rendered HTML first, markdown second, and the header that stops your cache serving the wrong one.
A plain-text version of this site for AI assistants is at https://contengi.com/llms.txt, with the full product documentation in one file at https://contengi.com/llms-full.txt. Every page is also available as markdown by adding .md to its URL.
- Serving AI crawlers a machine-readable version of your pages starts with the HTML your server sends, because none of the major AI crawlers render JavaScript. Markdown through content negotiation is a second layer on top of that, worth adding, and no substitute for it.
- Neither OpenAI's nor Anthropic's crawler documentation says anything about accepted content types or markdown negotiation. The clients asking for
text/markdowntoday are coding agents and user-initiated fetchers. - Cloudflare converts your HTML to markdown when a request carries an
Accept: text/markdownheader, free on its Pro, Business, and Enterprise plans. - OpenAI and Anthropic each run three separate bots, split across training, search, and user requests, and blocking the search one takes you out of AI answers.
- ChatGPT's crawler spent 34.82% of its fetches on 404 pages, so a clean sitemap and tidy redirects do more for you than another meta tag.
When I was at CXL I'd publish a new course page in the morning and see traffic from an LLM by the afternoon. A sale, sometimes, on the same day. Google had not indexed the page yet, so there was no ranking to speak of, and the model had already read the page and put it in front of someone who asked the right question.
That only works if the words are in the file the server hands over. This guide covers what AI crawlers read, why markdown has become the format agents ask for, how to serve both HTML and markdown from the same URL without tripping over your own cache, and which bots to let through the door.
What does machine-readable mean to an AI crawler?
It means the text sits in the raw HTML response, before a browser runs a single line of JavaScript. GPTBot, ClaudeBot, and PerplexityBot all skip JavaScript rendering. Gemini rides on Googlebot's infrastructure and Applebot uses a browser-based crawler, so those two are the exceptions.
The detail that catches teams out is that these crawlers do fetch your JavaScript files. ChatGPT's crawler requested them on 11.50% of its requests and Claude's on 23.84%, then executed none of it. Your bundle gets downloaded, your content stays invisible. HTML made up 57.70% of ChatGPT's fetches, and images were Claude's biggest category at 35.17%.
Think of it like a recipe. A crawler wants the printed card with the quantities on it. What a client-side rendered page hands over is a video of someone cooking, with the instructions somewhere in the footage.
Do AI crawlers like GPTBot support content negotiation for markdown?
Not according to their own documentation. OpenAI's crawler page names OAI-SearchBot for search, GPTBot for training, ChatGPT-User for user-initiated actions, and OAI-AdsBot for ad landing pages, with nothing about accepted content types, markdown, or content negotiation for any of them. The same holds for ClaudeBot, Claude-User, and Claude-SearchBot.
So who sends Accept: text/markdown? Coding agents and assistants that fetch a page the moment a person asks about it. Cloudflare built its markdown conversion for AI agents and web clients that ask by header, which tells you where the demand sits. Background training crawlers still take HTML.
Serve markdown because it is cheap to set up, saves tokens on every agent fetch, and gives you a clean copy of your own content for your own workflows. Do not serve it expecting GPTBot to start asking for it next week. Fix the HTML first, then add the markdown layer.
Which comes first, HTML or markdown?
HTML, every time. A markdown twin of a page that already renders server-side is an upgrade. A markdown twin of a page whose content only appears after JavaScript runs gives you a second broken copy.
| Layer | What it fixes | What it costs | Do it when |
|---|---|---|---|
| Server-rendered or static HTML | Content invisible to every non-rendering crawler | Developer time, or a framework change | Always, first |
| Clean sitemap and redirects | Crawl budget burned on 404s | An afternoon | Always, first |
| Markdown at the same URL | Token-heavy HTML on agent fetches | Free on Cloudflare Pro and up, or a few lines of server config | Once the HTML is right |
| .md twin URLs | Agents that cannot negotiate, and your own tooling | A build step change | Alongside negotiation |
| llms.txt | Discovery of your key pages | Minutes | Last, as a cheap extra |
How do you serve markdown through content negotiation?
The mechanism is HTTP content negotiation, which has sat in the spec for decades and is suddenly useful again. A browser sends Accept: text/html and gets your page. An agent sends Accept: text/markdown and gets the same content as plain text, from the same canonical URL.
Three headers do the work. The request carries Accept: text/markdown. Your response sets Content-Type: text/markdown; charset=utf-8 so the client parses it properly. And the response includes Vary: Accept, which tells every CDN and proxy in between to cache the two versions separately. Skip that last one and you will eventually serve markdown to a human, or HTML to an agent, out of a shared cache.
Test it from your terminal before you believe any dashboard:
curl -sI https://yoursite.com/pricing -H "Accept: text/markdown"
If you run Cloudflare, you do not have to build it. Markdown for Agents fetches the HTML from your origin and converts it when a request includes text/markdown in the Accept header. It adds YAML frontmatter with title, description, and image pulled from your meta tags, strips headers, footers, navigation, scripts, and styles, and keeps your JSON-LD in a code block at the end. Pro, Business, and Enterprise plans include it at no extra cost, and you turn it on per zone from the dashboard or per path with a configuration rule.
The caveats are worth knowing before you flip the switch. Only HTML gets converted, conversion is capped at 6 MiB of decompressed HTML, and Content-Length, ETag, and Last-Modified are stripped from the response, so conditional requests cannot be honoured. User agent values are client-supplied and unverified, which is a decent argument for negotiating on the Accept header rather than trying to spot bots by name.
Should you also publish .md twins?
Yes, as belt and braces. Not every client negotiates, and a predictable /about and /about.md pair is easy for anyone to find and easy for you to test. Advertise them from your HTML head with a link rel="alternate" type="text/markdown" element, so an agent reading the HTML can see where the clean copy lives. OpenAI and Anthropic both do this on their own developer documentation, where appending .md to a page URL returns the markdown version.
Two rules keeps this out of trouble. Generate both from the same source, so the text never drifts, and put a short frontmatter block at the top with the title and the canonical URL, so an agent that only ever sees the markdown still knows where it came from.
What about llms.txt?
An llms.txt file is a map of your important pages for language models, it takes minutes to produce, and support across AI engines is still patchy. Treat it as a cheap extra on top of readable HTML rather than the thing that gets you cited by ChatGPT.
Which bots should you let in?
OpenAI and Anthropic both split their crawling three ways, and a choice you make for one does not carry to the others. Blocking a training bot leaves the search bot and the user-initiated fetcher untouched.
Anthropic is specific about the trade. Restricting ClaudeBot signals that your future content should be excluded from training datasets. Disabling Claude-SearchBot stops Anthropic indexing your content for search, which may reduce your visibility and accuracy in user search results, and disabling Claude-User stops it retrieving your pages in answer to a user's question. On OpenAI's side, sites that opt out of OAI-SearchBot will not show up in ChatGPT's search answers.
There is now a cleaner way to say no to training alone. Since 30 October 2026, Anthropic honours a machine-readable training preference signal based on an IETF aipref draft, and a robots.txt rule naming ClaudeBot takes priority over it.
Anthropic also supports Crawl-delay as a non-standard extension, and warns that blocking its IP ranges tends to fail, because a blocked bot cannot read the robots.txt that would have told it to stay away. Worth remembering the next time someone suggests handling all this at the firewall. The full picture of which rules to write sits in our robots.txt for AI setup.
Your machine-readable checklist for this week
- See what a crawler gets. Run your home page, pricing page, and best-performing post through the free AI bot view, which loads each page as GPTBot with no JavaScript and scores the share of words that survived.
- Move content into the server's response. Server-side rendering or a static build is the real fix, and an AI-native website stack gives you that by default. Everything else patches over a page that arrives empty.
- Fix your 404s and redirect chains. ChatGPT's crawler spent 34.82% of its fetches on 404 pages and Claude's 34.16%, which is crawl budget you pay for in attention.
- Name the bots you want, one by one. Write rules for ClaudeBot, Claude-SearchBot, Claude-User, GPTBot, OAI-SearchBot, and ChatGPT-User separately, and repeat them on every subdomain.
- Turn on markdown negotiation. Cloudflare Pro and above gives you this for nothing. Otherwise add the
Acceptcheck, theContent-Type, andVary: Acceptto your server config. - Ship .md twins and link to them. Same source, short frontmatter, a markdown alternate in the head.
- Check your firewall and your logs. A bot rule can turn a crawler away before robots.txt is ever read, and your access logs are the only place that shows it happening.
Then write pages worth the fetch. A clean markdown copy of thin content is still thin content, so run your drafts through the AI slop cleaner before you worry about headers, and work through the tools that show what AI crawlers read when you need to audit more than a handful of pages.
Frequently asked questions
How do I serve AI crawlers a clean, machine-readable version of my pages?
Put your content in the HTML your server returns, because AI crawlers read that and skip your JavaScript. Then add markdown at the same URL through content negotiation, with Vary: Accept set so caches keep the two versions apart.
Do GPTBot and ClaudeBot request markdown?
Their documentation covers neither accepted content types nor content negotiation, so there is no support to rely on. The clients asking for text/markdown today are coding agents and user-initiated fetchers, which means markdown helps those fetches rather than the background training crawl.
Can ChatGPT read a JavaScript site?
OpenAI's crawlers download your HTML without executing scripts, so content that only appears in the browser can be invisible to them. Google renders JavaScript, which is how a page can rank on Google and still arrive blank in ChatGPT.
Does Cloudflare's Markdown for Agents cost extra?
No. Pro, Business, and Enterprise plans include it, and you enable it for a whole zone from the dashboard or for specific paths with a configuration rule.
Should I block AI crawlers in robots.txt?
Block the training bots if you want your content kept out of future models, and let the search bots through unless you are happy to disappear from AI answers. Those two decisions are separate for both OpenAI and Anthropic.
]]>