How to Write an llms.txt, With a Checklist to Validate It
By Seth Black · Published
An llms.txt is a Markdown file at the root of your site, /llms.txt, that gives an AI assistant a short map of what your site is and where the important pages are. The format, from llmstxt.org, needs only one thing, an H1 with the site’s name, but a useful file adds a one-line summary in a blockquote and sections of links with short notes. You can write a good one in half an hour; the checklist at the end tells you whether it is valid.
Does llms.txt do anything?
Honestly, the evidence is thin. It is a proposed convention, not a standard, and none of the major AI vendors’ crawler documentation that I read on 31 October 2026 (OpenAI, Anthropic, Perplexity, Google) says their crawlers read it. I made the longer case in llms.txt: does it matter?. The short version: it costs almost nothing, it helps agents and tools that do look for it, and it should never come before the things that definitely matter, such as letting the right crawlers in and serving real HTML.
If that trade sounds fine to you, here is how to write one properly.
What goes in an llms.txt, and in what order?
The llmstxt.org format, in order:
| Part | Required? | What it is |
|---|---|---|
# Name |
Yes, the only required part | The H1: your site or project name |
> Summary |
Recommended | A blockquote with the key facts someone needs to understand the rest of the file |
| Free text | Optional | Paragraphs or bullet lists with more detail, but no headings |
## Section lists |
Optional, zero or more | H2 sections, each a Markdown list of [name](url) links, with an optional : note after each |
## Optional |
Optional | By convention, secondary links an agent can skip when it is short on context |
The spec also suggests serving a clean Markdown version of important pages at the same URL with .md added, for example /docs/start.md, and linking those from the file. That is optional, and it only helps if the Markdown versions are kept in sync with the pages.
What does a good llms.txt look like?
Here is a complete example for a small software company:
# Example Widgets
> Example Widgets makes a desktop app for measuring network latency on
> Windows, macOS and Linux. One-time license, $49. Free 30-day trial.
- Founded 2019. Support by email, replies within one business day.
- The app runs locally; no account or cloud service is needed.
## Product
- [Features](https://example.com/features): what the app measures and exports
- [Pricing](https://example.com/pricing): license tiers and the trial
- [Download](https://example.com/download): installers for each platform
## Docs
- [Getting started](https://example.com/docs/start): install, first test, reading results
- [CLI reference](https://example.com/docs/cli): every command-line flag with examples
- [FAQ](https://example.com/faq): licensing, refunds, privacy
## Optional
- [Changelog](https://example.com/changelog)
- [Blog](https://example.com/blog)
Our own file at blackseoanalyzer.com/llms.txt follows the same shape: name, a summary with the facts people ask about most (what the product is, the price, the trial), a bullet list of hard facts, then sections for product pages, guides and posts. It is generated from the site’s data, so prices and version numbers cannot drift from the pages.
What should you write in the summary?
The facts an assistant is most likely to be asked, stated so they can be quoted without context. What the thing is, who it is for, what it costs, and anything people get wrong. Avoid adjectives; “fast, powerful, easy” tells a model nothing it can repeat. One to three sentences is plenty.
What should you leave out?
- Every page on your site. That is what a sitemap is for. Pick the ten to thirty pages that answer the questions people actually ask.
- Login, cart, account and search pages. They are useless to an assistant.
- Marketing copy. The notes after each link should say what the page contains, not why it is great.
- Relative links. Write
https://example.com/pricingor/pricing. A barepricing.htmlcannot be resolved reliably once the file is read outside your site. - Anything you would not want quoted. Assume every line can end up in an answer.
How do you serve it?
Put the file at the root of each host you want it to describe and serve it as plain text:
location = /llms.txt {
default_type text/plain;
charset utf-8;
}
Then check it from outside:
curl -sI https://example.com/llms.txt | grep -iE '^(HTTP|content-type)'
curl -s https://example.com/llms.txt | head -20
You want a 200 and a text content type. If your CDN puts bot challenges in front of the site, exempt /llms.txt, since the agents that read it are mostly coming from data centers.
How do you validate an llms.txt?
Run through this checklist. Each item maps to one of bseoa’s AI-readiness checks, so you can also let the crawler do it.
| Check | What to look for | bseoa check |
|---|---|---|
| The file exists | /llms.txt returns 200 |
Publish an llms.txt |
| It is not empty | More than whitespace | Your llms.txt Is Empty |
| It has a title | A first # Name line |
Add the Required Title |
| It has a summary | A > blockquote with real text |
Add a Summary Blockquote |
| It links somewhere | At least one [name](url) link |
Your llms.txt Points at Nothing |
| Links resolve | Every link starts with http://, https:// or / |
Use Resolvable URLs |
Two checks the crawler does not make, which you should do by hand:
- Every linked URL returns
200. A quick loop does it:
bash
curl -s https://example.com/llms.txt | grep -oE '\(https?://[^)]+\)' | tr -d '()' \
| while read u; do echo "$(curl -s -o /dev/null -w '%{http_code}' "$u") $u"; done
- The facts are current. A summary with last year’s price is worse than no summary. If you can, generate the file from the same data your pages use.
Where does llms.txt sit next to robots.txt and the sitemap?
robots.txt controls which crawlers may fetch what. The sitemap lists every URL you want indexed. llms.txt is a curated reading list for assistants. It does not grant or deny access, so a file full of links is no help if robots.txt blocks the crawlers that would follow them; the AI crawler robots.txt guide covers that side, and the free robots.txt tester checks a rule before you ship it. For where all of this fits, see GEO vs SEO.
-Sethers