llms.txt vs sitemap.xml
Both live at your site root and both help machines find your content — so people assume one makes the other redundant. They don't. sitemap.xml is an index: a complete list of every URL for search engines to crawl. llms.txt is a briefing: a short, curated, described shortlist of the pages you most want an AI to read and cite.
| sitemap.xml | llms.txt | |
|---|---|---|
| Purpose | List every indexable URL | Curate the best content for AI |
| Audience | Search crawlers (Google, Bing) | LLMs & AI assistants |
| Format | XML (<url> entries) | Markdown (headings, links, descriptions) |
| Scope | Exhaustive — all pages | Selective — key pages only |
| Descriptions? | No — URLs + metadata | Yes — a line per link |
| Standardized? | Yes — sitemaps.org | Proposed (Answer.AI, 2024) |
| Location | /sitemap.xml | /llms.txt |
What each file looks like
sitemap.xml
<?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <url><loc>https://example.com/</loc></url> <url><loc>https://example.com/docs/quickstart</loc></url> <url><loc>https://example.com/docs/api</loc></url> <url><loc>https://example.com/changelog</loc></url> </urlset>
llms.txt
# Example Co > Open-source analytics for indie developers. ## Docs - [Quickstart](https://example.com/docs/quickstart): install in 5 minutes - [API reference](https://example.com/docs/api): every endpoint ## Optional - [Changelog](https://example.com/changelog)
The short version
Keep sitemap.xml so search engines crawl everything. Add llms.txt so AI assistants understand and cite your best content. One is for coverage, the other is for clarity — ship both.
Generate a spec-compliant llms.txt for your site in one click — free, no signup.
Try the free llms.txt generator →FAQ
Does llms.txt replace sitemap.xml?
No. sitemap.xml is an exhaustive machine list of every indexable URL for search engines. llms.txt is a short, human-curated guide to your most important content, written for AI assistants. Keep both — they serve different consumers.
Can't AI just read my sitemap?
A sitemap tells a crawler what exists, but not what matters or what each page is about. llms.txt adds curation and one-line descriptions so an LLM can pick the right pages without crawling hundreds of URLs.
Should llms.txt link to the same URLs as my sitemap?
Usually a curated subset. Your sitemap might list 500 URLs; llms.txt should highlight the 10–30 pages you most want an AI to understand and cite — docs, key product pages, guides.
Where do they live?
Both at the site root: /sitemap.xml and /llms.txt. They're independent files; neither references the other, and crawlers request each on its own.
Related: What is llms.txt? · vs robots.txt · llms.txt for Next.js · Do AI crawlers read it?