Guide

llms.txt vs robots.txt vs sitemap.xml

All three live at your site root and all three are plain text, but they solve different problems. Mixing them up is the most common llms.txt mistake.

The one-line summary

Side by side

 robots.txtsitemap.xmlllms.txt
AnswersMay you fetch this?What pages exist?Which pages matter?
FormatDirectivesXMLMarkdown
ScopeEvery pathEvery indexable URLA curated shortlist
Read byAll crawlersSearch enginesLLMs and agents
Blocks access?YesNoNo

robots.txt is about permission

robots.txt tells crawlers which paths they're allowed to request. It is an access-control convention. It does not curate or rank content, and it isn't written for language models specifically.

What to put in robots.txt for LLMs

This is the part people actually come looking for, and it turns on one distinction: the bots that answer a user's question right now are not the bots that collect training data. Blocking the second group does not block the first, and confusing them is how sites accidentally make themselves invisible to ChatGPT and Perplexity while trying to opt out of training.

A setup that stays visible in AI answers while opting out of training looks like this:

# Answer engines — these fetch a page to cite it in a reply.
User-agent: OAI-SearchBot
User-agent: ChatGPT-User
User-agent: Claude-SearchBot
User-agent: Claude-User
User-agent: PerplexityBot
User-agent: Perplexity-User
Allow: /

# Training crawlers — a separate, opt-out choice.
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
Disallow: /

Sitemap: https://yourdomain.com/sitemap.xml

Two things worth knowing. Google-Extended controls certain Gemini uses of content Google has already crawled, and it has no effect on whether you appear in Google Search. And a Disallow is a prefix match, not a path: Disallow: /report never covers /uk/report, which is the sort of gap that quietly leaves a whole section crawlable.

If you would rather state intent than name every bot, the emerging Content Signals convention lets you declare permitted uses in one line: Content-Signal: search=yes, ai-input=yes, ai-train=no. It is young and not yet widely honoured, so treat it as a declaration alongside the directives above, not a replacement for them. Our validator reports whether your robots.txt carries one.

sitemap.xml is about coverage

A sitemap aims to be exhaustive: it maps all the URLs you want indexed so search engines don't miss anything. It's machine-oriented XML, not a human-readable summary.

llms.txt is about curation

llms.txt is the opposite of exhaustive. It's a hand-picked, Markdown list of the few pages that best help a model understand and use your site, with a short description on each. It exists for inference (helping when a user asks an AI for help), not for training datasets and not for access control.

They complement each other

You don't choose between them; a strong setup has all three. robots.txt governs access, sitemap.xml ensures coverage, and llms.txt curates signal for AI. Once you've written yours, run it through the validator and read how to create an llms.txt file for the format details.

Keep reading

Validate your llms.txt →