The llms.txt format
The whole format is ordinary Markdown with a few conventions about which elements mean what. Here is each one, and the rules that are stricter than they look.
Last updated
An llms.txt file has one H1 with the site name, an optional blockquote summary, optional free text, and H2 sections that each hold a list of Markdown links with a one-line description. That is the entire structure defined by the llms.txt proposal at llmstxt.org. Everything else on this page is about doing those parts well.
What is the basic skeleton?
# Site name <- H1, required, exactly one > One or two sentence summary. <- blockquote, optional, strongly recommended Optional free text paragraph explaining anything the summary could not. ## Section name <- H2, defines a section - [Page title](https://example.com/page): One-line description. - [Another page](https://example.com/other): One-line description. ## Optional <- a convention for secondary links - [Lower priority page](https://example.com/archive): Background reading.
The H1
Exactly one, at the top, giving the name of the site or organisation. Parsers take the first H1 as the file’s title; a second one is ambiguous and a file with none is malformed. Use your real brand name, not a keyword-stuffed variant.
The blockquote summary
Technically optional, in practice the most valuable line in the file. It is the part most likely to be read in full and quoted back. Use one or two sentences covering what you do, who for, and any qualifier that prevents a wrong assumption: where you operate, what you do not sell, who you are not for.
> Independent supplier of woodworking hand tools, based in Leeds. We sell, > sharpen and restore. UK shipping only; we do not sell power tools.
Note the last clause. Telling a model what you are not prevents a whole class of confidently wrong answers.
Sections
H2 headings group related links. Use the words your visitors use (Products, Documentation, Pricing, Support, Guides) rather than internal department names. H3 and deeper are not treated as section boundaries, so keep the hierarchy flat.
How should each link be written?
Every entry is a Markdown list item in one shape:
- [Link text](absolute URL): Description.
| Rule | Why |
|---|---|
| Markdown link syntax only | Bare URLs and HTML anchors are skipped by most parsers. |
| Absolute URLs, always | The file is read out of context, so /pricing cannot be resolved. |
| Colon and space before the description | This is the separator parsers split on. |
| One line per item | A line break inside an item can end it early. |
| Link text should be the page title | Not “click here”, and not a keyword phrase. |
How long should a description be?
One sentence, roughly ten to twenty-five words, and specific. The test is whether the description would let a model answer a simple question without opening the page. “Our pricing options” fails. “Three plans from USD 12 to USD 79 per user per month, billed annually” passes.
What is the Optional section for?
A section headed ## Optional is the conventional home for links that are useful but secondary: company history, changelogs, old announcements, legal pages. In the original proposal it told context-building tools what they could leave out. the V2 change notes for V2 dropped that mechanical meaning, so it is now simply a clear label for background material. It still reads best at the end of the file.
Do not use ## Optional as a dumping ground. If a page is not worth listing, leave it out. The section is for material that is genuinely useful but genuinely lower priority.
How must the file be served?
- At
/llms.txton the domain root, which every reader checks. Under V2 a file in a subdirectory also works and covers the pages beneath it; the most specific file applies. Each subdomain needs its own. - Content type
text/plainortext/markdown, nevertext/html. - UTF-8, ideally without a byte order mark.
- An HTTP 200 directly. A redirect chain is followed by some readers and not others.
- Not blocked by your own
robots.txt, which happens more often than you would expect.
V2 also adds two optional links your pages can carry: rel="describedby" pointing at the llms.txt that covers them, and rel="alternate" type="text/markdown" pointing at a Markdown version of the page. The V2 guide has the markup. The validator checks serving against a live URL.
Frequently asked questions
Can I use bold, tables or images?
It is Markdown, so nothing stops you, but readers only rely on the H1, blockquote, H2 sections and link lists. Extra formatting is at best ignored.
Does the order of sections matter?
Put the most important first, since a model working within a budget reads from the top. Put ## Optional, if you use it, at the end.
Is the file name case-sensitive?
Yes. It must be llms.txt, all lowercase. Section headings are free text.
Can I include URLs from another domain?
Technically yes, and sometimes sensible for documentation you host elsewhere. Do not use it to list third-party pages you have no connection to.