llms.txt is a plain text file served at the root of your domain (/llms.txt) that provides AI language models with a structured summary of what your site is, what it contains, and what is most important to index. Think of it as robots.txt for AI systems, except instead of blocking or allowing crawlers, it actively guides them.
The standard was proposed in 2024 and has been rapidly adopted. While not yet required by any AI system, sites with a well-structured llms.txt are showing higher citation rates across ChatGPT, Perplexity, and Claude, likely because the file makes it significantly easier for AI systems to understand and categorise site content.
Publishing llms.txt tells crawlers what to look for. It does not confirm they showed up. Checking your server logs is the only way to verify that GPTBot, ClaudeBot, and PerplexityBot actually fetched the pages you pointed them to.
What to include in llms.txt
- Site name and one-sentence description
- What the site does (product/service summary)
- Key pages with their URLs and brief descriptions
- What topics the site covers (helps AI match it to relevant queries)
- Contact information
- Optional: what the site does NOT cover (reduces incorrect citations)
llms.txt format and example
Where to serve it
Serve llms.txt at yourdomain.com/llms.txt with a Content-Type of text/plain. In Next.js, the cleanest approach is a Route Handler at app/llms.txt/route.ts that returns the content as a NextResponse with the correct headers. This also allows the content to be dynamically generated if needed.
Common mistakes to avoid
- Do not include sensitive information: llms.txt is publicly accessible
- Keep it focused: a 200-line llms.txt is harder for AI to parse than a 30-line one
- Update it when your site structure changes significantly
- Do not use it to stuff keywords: AI systems are good at detecting artificial content
- Do not list pages you have blocked in robots.txt: doing so creates contradictory signals
Some AI companies have announced they will formally support llms.txt in their crawlers. Implementing it now means your site is ready when adoption becomes widespread.