Quality beats length
A good llms.txt feels like a product manager wrote a one-page reading list for a new engineer — not like a crawler dump. These practices keep the file useful for agents and maintainable for humans. After edits, re-check with the llms.txt Validator.
H1 and summary
- H1 is the product or site name, not a SEO keyword paragraph.
- Blockquote summary should pass the “stranger skim” test in under ten seconds.
- Mention the problem category, not only brand adjectives.
- Prefer factual tone over campaign slogans.
Section architecture
Suggested default stack for SaaS / docs sites:
- Docs — start here, concepts, tutorials
- API or Reference — machines-oriented specs
- Examples — sample apps, recipes
- Policies — privacy, terms, AI use (when relevant)
- Optional — blog, changelog, community, status
Guidelines:
- Reuse plain English names agents already know.
- Avoid duplicate sections that cross-link the same ten URLs.
- Put primary paths above Optional so partial-context agents see them first.
- Leave empty sections out entirely — an H2 with zero links is noise (and a validator warning).
Link items
Every file-list line should look like:
- [Human title](https://absolute.example/path): one-line purpose
| Practice | Why |
|---|---|
| Absolute HTTPS | No ambiguous base URL |
| Descriptive title | Not “link 1” or “click here” |
| Colon notes | Helps ranking which page to open for a task |
| Living URLs | 404s destroy trust |
| Public pages | Auth walls confuse unauthenticated agents |
Avoid nested bullets, HTML <a> tags, or mixing tables into list sections.
Size budget
| Size | Guidance |
|---|---|
| < 10 KB | Comfortable for most indexes |
| 10–20 KB | Fine if notes are worth it |
| 20–50 KB | Trim or move prose to llms-full |
| > 50 KB | Very likely the wrong abstraction |
Long canonical prose belongs in pages linked from the index or in a llms-full.txt pack.
Optional section etiquette
Use ## Optional only when you understand the semantic: “safe to skip under tight context.” Do not hide your pricing or authentication docs there. Do put:
- Historical changelogs
- Marketing blog hubs
- Community forums
- Conference talk dumps
Spelling matters: title the heading Optional, not “Optional resources” if you want tools and agents that special-case the exact name.
Anti-patterns
- Sitemap dump — every product URL with no narrative.
- H1 missing / buried — YAML frontmatter or paragraphs before
# Title. - robots directives in Markdown —
Disallow:belongs in robots.txt; generate rules with the robots.txt Generator. - Relative-only site —
(/docs)looks fine on origin, fails for many consumers. - Stale launch copy — still links to
/docs/v1when you live on/docs/v3. - Internal-only URLs — staging hosts, localhost, VPN paths.
- HTML blobs — scraped chrome, cookie banners, nav scripts as text.
- Claiming legal force — llms.txt is not a contract against scrapers.
Process recommendations
- Treat the file as docs, store it in the docs repo, review it in PRs.
- Add a monthly or release-checklist item: “llms.txt links still 200?”
- After major IA changes, update the index before marketing announces.
- Keep crawl controls separate (robots) and search inventory separate (sitemap).
- For on-page SEO of human pages, still use meta tags and schema — llms.txt does not replace them.
Minimal quality scorecard
Before you merge:
- H1 first, meaningful product name
- Non-empty
>summary - Absolute links only (or intentional, documented relatives)
- Every H2 has ≥1 valid list link
- Optional used only for skippable content
- Size under ~20 KB
- Validator shows zero errors
- Live
/llms.txtreturns 200 and is not Disallowed
Run the llms.txt Validator until the scorecard is green, then deploy with confidence. Deeper overview: llms.txt complete guide.