llms.txt Best Practices 2026: The 9 Rules for a File AI Engines Trust
The llms.txt spec is short — one required H1, a few conventions — but the difference between a file agents use and a file they ignore is in the details. These nine rules cover format, curation, and maintenance.
1. Start With the H1 — It's the Only Required Element
The first line of llms.txt must be a single Markdown H1 with your site name. Everything else is optional by the spec — but a file with no H1 fails the very first check an agent (or a validator) runs.
# Example Site 2. Write a One-Line Summary as a Blockquote
Right under the H1, a > blockquote telling agents what the site is and who it's for.
This is the context an AI engine uses before reading anything else — make it specific, not
marketing-speak.
# Example Site
> A SaaS API documentation site for developers building with Example SDK. 3. Curate, Don't Dump
5 to 15 links. The whole point of llms.txt is that an agent can read it in milliseconds and know what matters. If your site needs more material, publish llms-full.txt and link to it — don't turn the index into a sitemap.
4. Use Absolute URLs — Always
Every link must be a full https://your-domain.com/… URL. Relative paths like
/docs/start or protocol-relative //example.com/x break agents that fetch
the file directly. The one allowed exception is the relative link to llms-full.txt
described in the spec.
5. Group Links With H2 Sections
Use ## headings to group related links — Documentation, Blog, Pricing, Support. Agents
use these sections to match the user's question to the right part of your site.
## Documentation
- [Getting Started](https://example.com/docs/getting-started)
- [API Reference](https://example.com/docs/api)
## Blog
- [How We Built X](https://example.com/blog/how-we-built-x) 6. Order Links by Importance
The spec has no ranking mechanism beyond order — so your most valuable pages go first within each section. First impressions matter for agents the same way they do for humans.
7. Keep Link Text Descriptive
Use link text that says what the page is ("Getting Started Guide"), not the URL or generic words ("click here"). Agents quote link text when they cite your site.
8. Maintain It Like Code
- Regenerate after major content changes (new flagship pages, removed sections).
- Validate after every change — our free validator scores spec compliance and flags broken structure.
- Generate from your sitemap with the generator when you add many pages at once.
- Serve it as
text/plainat the site root with no auth, no redirects.
9. Know What It Is — and Isn't
llms.txt is an AI-visibility signal, not a Google ranking factor. Don't neglect robots.txt, sitemap, and on-page SEO because you have it — run all three together (see how they compare), and you're covered for search crawlers and AI agents.
A Complete Reference Example
# Example Site
> A SaaS API documentation site for developers building with Example SDK.
## Documentation
- [Getting Started](https://example.com/docs/getting-started)
- [Authentication](https://example.com/docs/auth)
- [API Reference](https://example.com/docs/api)
## Blog
- [How We Built X](https://example.com/blog/how-we-built-x)
- [Pricing Philosophy](https://example.com/blog/pricing)
[llms-full.txt](llms-full.txt) That's a file an agent can act on in under a second. Build yours with the generator, check it with the validator, and keep it honest.