Skip to content
Learn menu

llms.txt, robots.txt and sitemap.xml

robots.txt, sitemap.xml and llms.txt are all plain files at predictable URLs, and they are easy to confuse. They do different jobs: robots.txt says what automated access is acceptable, a sitemap lists every indexable page for search engines, and llms.txt picks out what an AI agent should read and describes it. None replaces the others. This page compares them, quotes the llms.txt proposal on how it fits alongside the other two, and shows how they work together.

Updated

At a glance

robots.txtsitemap.xmlllms.txt
PurposeSays which paths automated clients may fetchLists the pages available for indexingGives agents a curated, described guide to the content worth reading
Who reads itCrawlers: search engines, AI crawlers, other botsSearch enginesAI agents, on demand, while helping a user
Location/robots.txt at the root of the host onlyUsually /sitemap.xml; can live elsewhere and be declared with a Sitemap: line in robots.txt/llms.txt at the root, or at any path, covering the pages under it
FormatPlain text: User-agent, Allow and Disallow rulesXML: a list of URLs with optional lastmod, or an index of sitemapsMarkdown: an H1, optional summary and notes, H2 lists of links with descriptions
CompletenessRules, not a page listEvery indexable pageA selection, and can link to other sites
What it controlsCrawler access, for crawlers that honour itNothing; it is a list of hintsNothing; it grants and denies no access
Defined byRFC 9309 (Robots Exclusion Protocol)The sitemaps.org protocolThe llmstxt.org proposal

How the proposal positions llms.txt

llms.txt is designed to coexist with current web standards. While sitemaps list all pages for search engines, `llms.txt` offers a curated overview for LLMs. It can complement robots.txt by providing context for allowed content. The file can also reference structured data markup used on the site, helping LLMs understand how to interpret this information in context.

The naming follows the same pattern: “The approach of using a standard filename follows /robots.txt and /sitemap.xml at the site root.” Unlike robots.txt, though, an llms.txt can also sit at a path, and the proposal chose that over RFC 8615’s /.well-known/ prefix because many authors control only a path on a shared host.

Why a sitemap is not a substitute

sitemap.xml is a list of all the indexable human-readable information available on a site. This isn’t a substitute for `llms.txt` since it:

  • “Often won’t have the LLM-readable versions of pages listed”
  • “Doesn’t include URLs to external sites, even though they might be helpful to understand the information”
  • “Will generally cover documents that in aggregate will be too large to fit in an LLM context window, and will include a lot of information that isn’t necessary to understand the site.”

The corollary is that an llms.txt which simply copies the sitemap misses the point. LLMSRank’s rubric has an audit for exactly this, Curation, not a sitemap: on sites with 50 or more sitemap pages, a file that links to most of the sitemap scores lower than one that selects. That is our rubric’s judgement; the proposal describes the difference but sets no threshold.

Inference, not training

The proposal draws the line between robots.txt and llms.txt by when and why each is read:

robots.txt and `llms.txt` have different purposes. robots.txt lets automated tools know what access to a site is considered acceptable, such as for search indexing bots. llms.txt information is instead used on demand, when an agent needs information about a topic while assisting a user. Our expectation was that llms.txt would mainly be useful for *inference* rather than *training*, and that is how it has been used, though training runs could take advantage of the information too.

So llms.txt is not a way to opt in to, or out of, AI training. If you want to control which crawlers fetch your site, that is robots.txt’s job (and, for clients that ignore it, your server’s or CDN’s). llms.txt only shapes what a reader that does arrive finds first.

How they work together

  • robots.txt has to let agents fetch it. The proposal doesn’t say how robots.txt rules apply to llms.txt, but an agent that honours robots.txt and is disallowed from /llms.txt won’t read it. In our July 2026 study, 3 sites published an llms.txt while blocking AI crawlers from fetching it.
  • Be explicit about AI crawlers. Only 33 of 148 robots.txt files in our study named any AI crawler. Naming the ones you welcome makes your intent unambiguous. This is LLMSRank’s recommendation (Named AI crawlers), not the proposal’s.
  • Keep the sitemap complete and llms.txt selective. The sitemap is still how search engines find every page. llms.txt is the short list, in your order, with a line on what each page answers.
  • Point llms.txt at markdown. A sitemap lists HTML pages; llms.txt links should go to LLM-friendly content, such as markdown versions of those pages.
  • Keep dates honest. A sitemap’s lastmod and a date line in llms.txt should agree with when pages really changed. LLMSRank’s rubric (Sitemap freshness) checks that sitemap dates are plausible.

Frequently asked questions

Does llms.txt replace my sitemap?
No. A sitemap lists every indexable page for search engines; llms.txt is a curated selection for AI agents. The proposal gives three reasons a sitemap is no substitute, and none for dropping the sitemap.
Does llms.txt control what AI can crawl or train on?
No. It grants and denies nothing. Access rules belong in robots.txt, and the proposal expects llms.txt to be used mainly at inference time, when an agent is helping a user.
Should I reference llms.txt from robots.txt?
The proposal doesn’t define any robots.txt directive for llms.txt. What matters is that your robots.txt allows the agents you want to fetch it; for discovery from your pages, v2 recommends rel="describedby" links.
Can robots.txt stop agents reading my llms.txt?
Yes, for agents that honour robots.txt: if their user agent is disallowed from /llms.txt, they won’t fetch it. Three sites in our July 2026 study had exactly this problem.
Where does each file go?
robots.txt only at the root of the host. A sitemap usually at /sitemap.xml, or anywhere declared in robots.txt. llms.txt at /llms.txt or at any path, where it covers the pages under that path.
Can llms.txt link to pages that are not in my sitemap?
Yes. The proposal counts leaving out external URLs “even though they might be helpful” as a weakness of sitemaps, and its own example links to other sites.

Sources