How to Write a Good llms.txt File
AI assistants increasingly answer questions by reading websites directly. Normal pages are full of navigation, scripts and ads that waste the model's limited context. An llms.txt file gives them a clean, hand-picked map of your content, which makes it more likely they describe your product accurately and link to the right page.
Required structure
The only required element is an H1 with the site or project name. It should be followed by a blockquote summary, optional free-text detail, and one or more H2 sections containing Markdown link lists.
# Project name
> Short summary.
## Docs
- [Quick start](https://example.com/start): First steps
## Optional
- [Changelog](https://example.com/changelog)Choose links carefully
List the pages that answer the questions people actually ask: getting started, pricing, main features, API reference, key guides. Skip legal pages and thin tag archives. A section called 'Optional' signals content that can be skipped when context is short.
Write notes for each link
A short note after each link ("Install and run your first job") helps the model choose the right page without opening every one. Keep them factual and specific.
Pair it with robots.txt
llms.txt only helps if AI crawlers are allowed to read your site. Check that your robots.txt does not block GPTBot, ClaudeBot or PerplexityBot unless you mean to, and keep your sitemap up to date.