How to Create an llms.txt File (with Template)

A step-by-step guide to writing an llms.txt file: the markdown format, what to include, where to put it, and the optional llms-full.txt, plus a note on what it does and doesn't do.

By Andrej Ruckij · · 5 min read

How to Create an llms.txt File (with Template)

By Andrej Ruckij · June 16, 2026 · updated November 4, 2026

TL;DR: Create an llms.txt file by writing a short markdown document (an H1 title, a one-line blockquote summary, then H2 sections linking to your most important pages) and placing it at https://yoursite.com/llms.txt. It takes about 20 minutes. Just know what it is: a comprehension aid for AI, not access control (see glossary/llms-txt).

This is a cluster under our complete guide to llms.txt. Here we cover the mechanics: the exact format, a copy-paste template, where the file goes, and the optional llms-full.txt companion.

What an llms.txt file actually is

llms.txt is a plain markdown file at your site root that gives large language models a curated map of your best content. It was proposed by Jeremy Howard (Answer.AI) in September 2024 and revised as v2 in August 2026. Unlike a sitemap, it doesn’t list every URL. It lists what matters, with a short description of each, so an AI can orient quickly instead of inferring structure from messy HTML.

The format

The spec is deliberately simple. A valid llms.txt has:

  1. An H1: your site or project name (the only required element).
  2. A blockquote summary: one or two sentences on what the site is.
  3. Optional detail paragraphs: context, in plain prose.
  4. H2 sections: grouped lists of links, each as [Title](url): one-line note.

An ## Optional section is a convention for secondary links an AI can skip when it’s short on context. Since the v2 revision it has no special technical meaning; it’s just a useful label.

Copy-paste template

# Your Brand

> One-sentence description of what your site offers and who it's for.

A short paragraph of extra context an AI should know — your focus,
your point of view, anything that helps it represent you accurately.

## Core pages
- [Homepage](https://yoursite.com/): what you do
- [About](https://yoursite.com/about): who you are, credentials

## Guides
- [Guide title](https://yoursite.com/guide): what it covers
- [Another guide](https://yoursite.com/guide-2): what it covers

## Optional
- [Pricing](https://yoursite.com/pricing): plans and costs

Where to put it

Place the file at the root of your domain: https://yoursite.com/llms.txt (same convention as robots.txt). Since v2, a file can also live under a subpath, such as /docs/llms.txt. It then covers the pages under that path, and the most specific file wins, which helps if you only control one section of a site. v2 also lets pages point to their llms.txt with a <link rel="describedby"> element or HTTP header. If you’d rather not write it by hand, some tools generate it: Yoast SEO on WordPress (free, refreshed automatically), AIOSEO and Wix (listed in the spec as generating it), docs platforms such as Mintlify and GitBook, and build plugins such as vitepress-plugin-llms and docusaurus-plugin-llms.

The optional llms-full.txt

llms.txt is the map; llms-full.txt is the territory: a single file containing the full expanded content of your key pages in clean markdown, for AI systems that want the whole text without crawling. It’s optional and larger; add it only if you have a docs-heavy or reference site where full-text ingestion is valuable.

Keep it curated, not exhaustive

The most common mistake is treating llms.txt like a sitemap and dumping every URL into it. Don’t. Its value is curation: pointing AI at your best, most representative pages (my rule of thumb is 10–30). A bloated llms.txt defeats the purpose.

Look at it again whenever you restructure the site or publish a major page. A file that still links moved or deleted pages sends AI to the wrong place.

On a docs site, don’t write it by hand. Generate it from your docs build so it regenerates on every deploy, and if it grows past 100,000 characters, split it into child files by section. That’s what Mintlify did when its own generator’s 100,000-character cap started dropping pages on large docs sites.

The honest caveat

Creating the file is the easy part. The AI search engines barely fetch it, and Google says it will “neither harm nor help” your Search visibility. It also can’t keep any bot out. The place it measurably helps is documentation read by coding agents. See does-llms-txt-work for the evidence and a rule by site type.

Key takeaways

  • Minimum viable llms.txt: an H1, a blockquote summary, and H2 link sections, at /llms.txt.
  • Curate (your best 10–30 pages), don’t dump every URL.
  • llms-full.txt is an optional full-text companion for reference-heavy sites.
  • It’s a comprehension aid, not access control or a citation guarantee.

Sources