How to Validate an llms.txt File Before Publishing
A broken llms.txt is worse than no llms.txt. If the file is malformed, the tools and models that do read it get a confusing or incomplete picture of your site — the opposite of what you wanted. The good news: the llms.txt format is simple, so validation is quick once you know what to check.
This is a practical, no-fluff checklist you can run before every publish.
What the format actually requires
The llms.txt format (from llmstxt.org) is intentionally minimal Markdown:
- A single H1 title naming the project — the first line of the file.
- An optional but recommended summary blockquote (
> …) right after the title. - Zero or more H2 sections (
## Docs,## API, …), each containing a list of links. - Each link is a list item:
- [Name](https://example.com/page): short description.
That’s the whole structure. Most validation problems are deviations from this shape.
The pre-publish checklist
1. Exactly one H1, and it’s first
The file should open with one # Title line. Common mistakes:
- No H1 at all (the file starts with prose or a list).
- Multiple H1s (use
##for sections instead). - The H1 buried below other content.
2. A summary blockquote
Right after the title, include a one-line > blockquote describing what the site or project is. It gives any reader — model or human — instant context. It’s optional in the spec, but recommended in practice.
3. Sections that group your links
Use ## headings to group related links: ## Documentation, ## API Reference, ## Guides. A flat dump of links with no sections is hard to navigate. If you have more than a handful of links, group them.
4. Well-formed links
Check every link for:
- Empty URLs —
[Docs]()with nothing inside the parentheses. - Missing link text —
[](https://…)with no label. - Malformed URLs — typos, missing
https://, stray characters. - Duplicate links — the same URL appearing more than once wastes space and signals a copy-paste error.
5. Descriptions on every link
A bare - [Quickstart](https://…) is far less useful than - [Quickstart](https://…): Get set up in five minutes. The description tells a model why the link matters and when to follow it. Add one to every list-item link.
6. Keep it concise
llms.txt is an index, not an archive. If your file is very large (tens of kilobytes or more), that’s a signal you’re stuffing full content where a curated link list belongs.
7. Consider a companion llms-full.txt
If you genuinely have a lot of long-form content models might want in full, publish a separate llms-full.txt with the complete text, and keep llms.txt as the lightweight map that links to it.
A quick example of a clean file
# Acme Docs
> Acme is an API for sending transactional email. This file indexes the docs and reference.
## Getting Started
- [Quickstart](https://acme.dev/quickstart): Send your first email in five minutes
- [Authentication](https://acme.dev/auth): API keys and scopes
## API Reference
- [Messages API](https://acme.dev/api/messages): Create and send messages
- [Webhooks](https://acme.dev/api/webhooks): Delivery and bounce events
## Optional
- [Changelog](https://acme.dev/changelog): Release notes
One H1, a summary, grouped sections, described links, no duplicates. That’s the target.
Validate it automatically
Running the checklist by hand works, but it’s easy to miss a duplicate URL or a missing description in a long file. Our free llms.txt validator checks all of the above in one pass and gives you a structure score plus specific, line-aware suggestions.
You can validate in two ways:
- Paste your content directly into the validator, or
- Enter a URL — point it at your site (we’ll fetch
/llms.txtautomatically) or link straight to the file. This is handy for checking a file that’s already live.
Either way you’ll see exactly what to fix before — or after — you publish.
After you fix the issues
Once the validator is happy:
- Save the file as
llms.txtand upload it to your domain root (https://example.com/llms.txt). - Re-run the validator against the live URL to confirm it’s served as plain text and reachable.
- Re-check it whenever you restructure your site or add major sections.
The bottom line
Validation takes a couple of minutes and saves you from shipping a file that quietly misleads the tools reading it. Run the checklist, fix the structure, and confirm with the validator before you publish.
Don’t have a file yet? Generate a clean draft from your site with the llms.txt generator, then validate it. And if you’re still deciding whether you need one at all, see When llms.txt Makes Sense.