llms.txt best practices
Write for the task an agent needs to complete: understand the publisher, find the right page and check the original source. The llms.txt project describes the format. File validity, directory eligibility, helpful writing and actual AI citations are separate questions.
1. Make it a real text file
The single most common failure: the server returns the site's HTML app shell with a 200 status for any unknown path, so /llms.txt "exists" but is a web page. Serve the file with Content-Type: text/plain; charset=utf-8 (or text/markdown), and check it with curl -i https://yoursite/llms.txt.
2. Start with the H1 and the blockquote
The H1 site or project title is required. A blockquote summary is optional but useful: describe what you are, who you help and what the linked material covers. Missing a summary should be a writing recommendation, not a format failure.
3. Link to your own pages with absolute HTTPS URLs
Group links under H2 headings. Each link gets a short description after a colon. Use absolute URLs on your own domain; relative links and links that redirect elsewhere are skipped by many readers. Dead links cost quality: keep them working.
4. Keep it on the canonical domain
If example.us redirects wholesale to example.com, publish the file on example.com and let the alias redirect. A domain that only redirects elsewhere is not a publisher of its own.
5. Don't copy a template verbatim
A file that is identical across many unrelated sites reads as boilerplate, to directories and to agents alike. Language versions on separate domains are fine when they differ; write the French file in French.
6. Publish llms-full.txt too, if you can
An optional extended reference can help readers who need more content. Link it only if the file actually exists and is maintained. A missing llms-full.txt does not make llms.txt invalid, and a larger file is not automatically more useful.
7. Use ## Optional for the long tail
Readers with little context budget stop before the Optional section. Put changelogs, archives and legal pages there.
8. Keep it current
Freshness is part of the score, and files are re-checked over time. Verified owners can review file health, request a fresh check and follow score history in their private dashboard.
9. Mind the size
Keep the entry file concise enough to scan and give important links descriptive names. Move lengthy reference material into separate linked files. Our draft checker accepts up to 512 KiB; that is a processing limit, not a target file size.
10. Connect your verified listing if useful
Ownership management is optional. Use Manage your listing for a fresh ownership check and browser controls: edit your profile, publish terms for agents, review file health, measured discovery requests, publisher clicks and score history. A backlink is not required, and confirmation of domain control is not an endorsement of the site's content.
Check your llms.txt against these rules → · Generate a draft → · Submit your site →
More: WebMCP: give agents a clearer way in. · Can AI find, understand and cite your website? · Check what an MCP endpoint actually returns. · Agentic commerce needs evidence behind the interface. · Find the right documentation before using it. · The llms.txt project · What is llms.txt? · llms.txt examples · checker · generator