llms.txt GeneratorGenerate llms.txt

How to Write llms.txt: Format & Common Mistakes

llms.txt Generator EditorialUpdated June 16, 2026

To write an llms.txt file, create a Markdown file with an H1 holding your site or project name (the only required element), an optional blockquote summary, and H2 sections — like Docs, Guides or API — each containing a Markdown list of links in the form [name](url): short description. Save it as llms.txt and deploy it at your site root so it resolves at /llms.txt. Keep links curated rather than exhaustive, write descriptions that say what each page actually answers, and make sure the file is valid Markdown. The most common mistakes are dumping every URL, omitting descriptions, and breaking the Markdown structure so the file can't be parsed cleanly.

What are the key takeaways?

A valid llms.txt file requires only an H1 site name; the llmstxt.org spec recommends 3–5 H2 sections with 10–20 curated links for most sites in 2026.

  • Required: one H1 with your site or project name.
  • Recommended: blockquote summary, H2 sections, and - [name](url): description link lists.
  • Deploy at your site root so the file resolves at /llms.txt.
  • Curate 10–20 high-value pages — not your full sitemap.
  • Use the free generator for a spec-style first draft, then review before publishing.

What are the steps to write a valid llms.txt?

Writing a valid llms.txt takes six steps: add an H1 site name (the only required line per llmstxt.org), write a blockquote summary, group links under H2 sections, describe each link, validate Markdown syntax, and deploy at /llms.txt.

After the H1, add a one- or two-sentence blockquote summarizing what the site is and who it serves. Create H2 sections (Docs, Guides, API) and list links as `- [name](url): short description`. Save as plain Markdown named llms.txt at your site root.

  1. 1Create a Markdown file named llms.txt.
  2. 2Add an H1 with the site or project name (required).
  3. 3Add a one- or two-sentence blockquote summary (optional but recommended).
  4. 4Create H2 sections that group links by purpose (Docs, Guides, API).
  5. 5Under each section, list links as - [name](url): short description.
  6. 6Validate that it's clean Markdown, then deploy at the site root.

What does a good llms.txt look like?

A good llms.txt is a curated table of contents: site name and summary at the top, 3–5 logical H2 sections, and descriptions that state what question each page answers — typically 10–20 links total, not your full sitemap.

Curation is the differentiator introduced in the 2024 Answer.AI proposal. Ten well-described, high-value links beat 100 bare URLs for both model context limits and long-term maintainability.

  • Site name and a clear one-line summary at the top.
  • Logical H2 sections, not one giant flat list.
  • Descriptions that state what each page answers.
  • Curated, high-value links rather than your entire sitemap.

What are the most common llms.txt mistakes?

The three most common llms.txt mistakes are sitemap dumps (every URL, no descriptions), invalid Markdown (broken link syntax or inconsistent heading levels), and stale links after pages move or redirect.

Other frequent issues in 2026: linking to pages crawlers cannot reach, overstating citation impact to stakeholders, and skipping human review after automated generation. Keep the file accurate, valid, and honest about what the llmstxt.org spec actually promises.

  • Dumping every URL with no descriptions (it's a map, not a sitemap).
  • Invalid or inconsistent Markdown that won't parse cleanly.
  • Letting links rot as pages move or get renamed.
  • Linking to pages crawlers can't actually reach.
  • Believing — or claiming — it guarantees more AI citations (0% controlled evidence as of 2026).

How do you validate llms.txt before deploy?

Validate llms.txt by checking three things before deploy: the file resolves at /llms.txt, every link returns HTTP 200, and the Markdown parses cleanly with one H1 and valid `- [name](url): description` lists.

Run a quick link check after each edit — broken links undermine the map faster than stale descriptions. The llmstxt.org format requires only the H1; everything else is optional but recommended for model usability.

Frequently asked questions

What is the only required part of an llms.txt file?+

An H1 containing the site or project name. Everything else — the summary blockquote, the H2 sections and the link lists — is optional in the spec, though sections and descriptions are what make the file actually useful to a model.

Where do I deploy the llms.txt file?+

At your site root, so it resolves at https://yourdomain.com/llms.txt. How you do that depends on your stack — a static file in your public directory, or a route that returns the Markdown with a text/plain content type.

Should llms.txt list every page on my site?+

No. It's a curated highlight reel, not a sitemap. List the high-value pages you most want a model to understand, with a clear description each. A short, well-described file beats an exhaustive, bare one.

Sources

Free generator

Generate your llms.txt content map

Enter a URL and get a spec-style llms.txt + llms-full.txt with deployment instructions.

Generate llms.txt