How to Generate an llms.txt File (and Validate It Actually Works)
How to generate an llms.txt file from your sitemap and validate it as GPTBot and ClaudeBot would — so AI tools get a working map of your site, not a link dump.
GEO · 8 min read · Step-by-step
Learning how to generate an llms.txt file is the difference between handing AI tools a map of your site and handing them a pile of links. The file itself is simple — a small Markdown document at your site's root that names your product, summarises it in a sentence or two, and lists your most important pages with a short description of each. The hard part is keeping it accurate: prices change, pages move, new guides ship, and a hand-written file silently goes stale. Generating it from your live pages, then validating it the way a crawler would, is the workflow that keeps it honest. This guide covers the generator approach end to end.
One honest caveat first: llms.txt is a proposed convention from 2024, not a standard, and none of the major AI vendors' crawler documentation currently says their crawlers read it. Treat it as low-cost documentation that helps the tools that do use it — and as a genuinely useful map of your own site — not as a guaranteed ranking lever. The generator workflow below costs little, and it removes the main failure mode of hand-written files: staleness.
If you would rather write the file by hand, the manual method is covered in How to Write an llms.txt File (With a Copy-Paste Template) — use that for your first version, then come back here when you want the file to maintain itself. For the background on what the file is and what llms-full.txt means, see What Is llms.txt?.
Step 1: Know what good generator output looks like — and what bad output looks like
Before you trust any generator, know the target. A good llms.txt has a strict shape, defined by the llmstxt.org spec:
- An H1 with the name of the site or project. The only required element.
- A blockquote summary. One or two sentences stating what the product is, who it is for, and one or two hard facts — price, trial, or a defining limit. No slogans; a model cannot answer "what does this cost?" from "the future of work, reimagined."
- H2 sections grouping links by what the reader is trying to do — "Product", "Docs", "Guides" — each link a Markdown link with a factual note after the colon.
- An optional
## Optionalsection for secondary links a reader can skip when context is tight.
A typical software site ends up with 10 to 30 links. Selection is the file's job; your sitemap already lists every URL, and a file that lists everything is a sitemap in Markdown clothing.
Bad generator output has a recognisable smell. Watch for these four defects:
- Link dumps with no descriptions. A bare URL tells a reader where a page is; a factual note tells them whether it answers their question. If the generator emits links without notes, its output is barely better than a sitemap.
- Stale URLs. Pages that moved, redirect, or return 404. A generator that reads your live sitemap will not produce these; one that works from a cached crawl will.
- Slogan summaries. If the summary reads like a tagline, the generator has copied your hero copy instead of your facts. Rewrite it by hand.
- Wrong scope. Everything included, or only the homepage. Both mean the generator had no selection rule — it needs one before you trust it.
Judge the first generated draft against this checklist before you publish it. A generator saves typing; it does not save judgement.
Step 2: Generate from your sitemap and content inventory
The generator's input should be your site as it is today, not as someone remembers it: your sitemap for the URL inventory, and the live pages themselves for titles and summaries. AEOTools' free fix workflow does exactly this — its /fix module drafts an llms.txt from your site's actual pages, with titles, summaries, and section links drawn from what is live now — and it is free to use with no account, like the rest of the free tier (39-check page diagnostics at 10 pages a day, site-wide diagnostics at 2 a day, fetch simulation for 7 AI crawler identities, and the fix generators for llms.txt and JSON-LD).
Whether you use that workflow or another generator, the steps are the same:
- Feed it your sitemap. Give the generator
https://yourdomain.com/sitemap.xmlas the inventory, not a hand-typed list. The sitemap is the one list that is already maintained. - Set the selection rule. Tell it how many pages to include and which kinds: what the product does, what it costs, how it works, and the two or three guides that answer your most common questions. Ten to thirty links is the usual range; if a page would not help someone answer a question about your product, leave it out.
- Check the summaries it writes. A generator that pulls the first paragraph of each page usually produces usable notes; one that invents descriptions from the URL slug does not. Read every note in the draft and correct any that are wrong — a wrong description misleads more than a missing one.
- Group by task, not by navigation. Ask for sections named after what the reader is trying to do. "Product", "Docs", and "Guides" work; "Pages" and "Misc" do not.
A short example of what the output should look like — an illustrative snippet for a fictional invoicing tool:
# Example Co
> Example Co makes invoicing software for freelancers. Plans start at $12 per month; there is a free plan for up to 3 clients.
## Product
- [Features](https://example.com/features): What the product does, grouped by use case.
- [Pricing](https://example.com/pricing): Plans, limits and what each plan includes.
## Guides
- [How to charge a late fee](https://example.com/blog/late-fee): Step-by-step guide with an example invoice.
If your generator's draft does not look roughly like this — H1, factual summary, grouped links with real descriptions — fix the generator's inputs before you publish its output.
Step 3: Validate — serve it at /llms.txt and fetch it as a crawler would
Publishing is not validation. The file must live at the root — https://yourdomain.com/llms.txt, not /docs/llms.txt — and it must survive the checks a crawler would run. Work through these in order:
curl -I https://yourdomain.com/llms.txt
You want a 200 status, served as plain text or Markdown, with no redirect to a login page and no JavaScript required to render it. A redirect chain to a login page means the file is effectively invisible to crawlers, whatever your browser shows.
Then check the content the way a crawler would:
- Fetch it as the crawlers. AEOTools' fetch simulation (free, no account) fetches your pages as seven AI crawler identities — GPTBot, ClaudeBot, PerplexityBot, and others — so you can confirm the file is served to them, not just to your browser. If the simulated fetch of
/llms.txtfails or returns different content, fix the access problem first. - Check every link resolves. Run through the links in the file and confirm each returns 200 with no redirect chain. A link to a page that moved is worse than no link: it teaches the reader that your map cannot be trusted.
- Check the descriptions match the pages. Open three or four linked pages and compare the file's note against the live page. If the pricing note says $12 a month and the page says $19, the file is already stale — regenerate it from the live pages rather than patching by hand.
- Read it as a stranger. Does the summary state what the site is? Do the sections answer the obvious questions? If a new colleague had ten minutes before answering questions about your site, would this file be the right ten minutes?
Only after all four checks pass should you consider the file live. A file that fails validation is not a minor defect; it is the file actively misinforming the few readers it gets.
Step 4: Keep it in sync — regenerate when you publish
A generated file's advantage is that regeneration is cheap, so the rule is simple: regenerate whenever the facts change. Concretely, regenerate when you change pricing or positioning, add or remove a core page, or publish a guide that belongs in the file. Tie it to your publishing checklist so it happens the same day, not "when someone remembers" — a stale llms.txt misleads more than no llms.txt at all.
If you want a comparison before committing to a generator, the AEO analysis software roundup compares tools that include llms.txt generation and validation, by engine coverage, free allowance, and price.
One related decision: whether to also generate llms-full.txt, the companion convention that packs the full text of the listed pages into a single file. The rule of thumb is to add it only for your most important pages, and only if the combined file stays readable — short product and pricing pages, yes; a 40-page documentation set, no. Start with llms.txt; add llms-full.txt when a specific reader needs the complete content in one fetch, and regenerate it on the same schedule as the main file.
Common mistakes
| Mistake | Why it hurts |
|---|---|
File in the wrong place (/docs/llms.txt) |
Crawlers look for /llms.txt at the root and will not find it |
| Publishing without validation | A 404, a login redirect, or dead links misinform every reader |
| Accepting description-free link dumps | The reader cannot tell which page answers their question |
| Generating once, never again | Prices and pages drift; the file silently goes stale |
| Listing every URL | Selection is the file's job; a full list is a sitemap |
| Full text for everything in llms-full.txt | A bloated file nobody reads, instead of a focused one |
FAQ
How do I generate an llms.txt file for free?
Use a generator that reads your live sitemap and pages — AEOTools' fix module drafts one from your actual pages with no account and no cost — then validate it with a curl -I check, a fetch simulation as the AI crawlers, and a pass through every link. Free generation is only half the job; the validation step is what makes the file trustworthy.
Is a generated llms.txt better than a hand-written one?
A generated file is better at staying current, because regeneration is cheap and reads the live pages. A hand-written file is better at judgement — which pages matter, how to describe them — for a first version. The practical answer is both: hand-write the first draft to set the selection rules, then generate from then on.
Should llms.txt list every page on my site?
No. Pick 10 to 30 pages: what the product does, what it costs, how it works, and the guides that answer your most common questions. If a page would not help someone answer a question about your product, leave it out — or put it in the ## Optional section if it still deserves a mention.
How often should I regenerate llms.txt?
Whenever the facts change: pricing or positioning updates, a core page added or removed, or a new guide that belongs in the file. Tie regeneration to your publishing checklist so it happens the same day the change ships.