The Complete llms.txt Format Guide
Everything you need to write a spec-perfect llms.txt file: the official format, every element explained, a valid end-to-end example, common mistakes, and answers to the questions developers ask most.
What Is the llms.txt Format?
llms.txt is a plain Markdown file, conventionally placed at the root of a website
(https://your-domain.com/llms.txt), that gives AI engines — ChatGPT, Claude, Gemini,
Perplexity, coding agents — a curated, human- and LLM-readable index of your content. The proposal was
published in 2024 by AI researcher
Jeremy Howard
and the canonical specification lives at
llmstxt.org
(v2, August 2026). It's the LLM equivalent of robots.txt: instead of telling crawlers what
not to visit, it tells agents exactly what is worth reading — in one small file that
fits comfortably in a context window.
Why should developers and site owners care about the format itself? Because adoption is no longer hypothetical: Chrome's Lighthouse audits sites for an llms.txt file, documentation platforms such as Mintlify and GitBook generate one automatically, and OpenAI, Anthropic, and Google all publish llms.txt files for their own docs. An invalid or badly structured file fails the audit, confuses parsers, and costs you visibility in AI answers — so knowing the exact structure matters.
The llms.txt Specification, Element by Element
The format is deliberately minimal: it uses Markdown as the structure language, and it can be parsed with plain regex and a list parser. Per the llmstxt.org v2 specification, a valid file contains the following elements in this order:
- H1 heading (
# Site Name) — the name of the project or site. This is the only required element in the whole file. An optional byte-order mark (BOM) may precede it. - Blockquote summary (
> ...) — an optional one- or two-line summary containing the key context needed to understand everything else in the file. - Free-form notes — zero or more Markdown sections (paragraphs, lists, and so on) of any type except headings, giving agents more detail about the project and how to interpret the links below.
- H2 sections (
## Section Name) — zero or more sections that each contain a "file list": a Markdown list of links where further detail lives. A section named## Optionalis used by convention for secondary links that agents can skip when context is short. - Link list items — each entry is a Markdown hyperlink
[text](url), optionally followed by a colon and a short note about the file:- [API reference](https://site.dev/api.md): Complete REST API docs.
Two additional rules keep files machine-readable:
- URLs must be absolute. Use full
https://…addresses — relative paths like/docs/apibreak both LLM consumption and regex-based parsers. Prefer linking to clean Markdown versions of pages (same URL with.mdappended or substituted). - There is no comment syntax. A line starting with
#is parsed as a heading, not a comment — so never use hash-comments to annotate the file. If you want human-readable annotations, use HTML comments (<!-- ... -->) in the free-form notes area above the first##; parsers ignore them.
One more scoping rule: an llms.txt file doesn't have to live at the site root. It can be placed at any
path (e.g. /docs/llms.txt) and then covers all URLs under that path. Where multiple files
apply, agents should use the most specific one.
llms.txt Structure: Element Reference Table
| Element | Required? | Description |
|---|---|---|
| Byte-order mark (BOM) | Optional | May precede the file content; parsed and skipped by tools. |
H1 heading (# Name) | Yes — the only required element | Name of the site or project. |
Blockquote (> ...) | Optional | Short summary with the key context for interpreting the file. |
| Free-form notes | Optional | Paragraphs and lists with more detail; any Markdown except headings. |
H2 sections (## Name) | Optional | Delimit "file lists" of links; ## Optional is reserved by convention for secondary links. |
Link list items ([text](url)) | Inside H2 sections | Required Markdown hyperlink, optionally followed by : description. |
| Absolute URLs | Yes | Every link must be a full https://… address; no relative paths. |
A Complete, Valid llms.txt Example
Here is a full example that follows the v2 specification exactly — H1, blockquote, notes, H2 file lists, absolute URLs, and a trailing ## Optional section:
# Acme Documentation
> Acme is a developer platform for building and deploying serverless applications in Python and TypeScript.
Important notes:
- All APIs below are stable; existing endpoints never break compatibility.
- Examples assume the latest CLI, installable with `pip install acme-cli`.
## Important links
- [Acme quick start](https://acme.dev/docs/quickstart.md): Set up your first app in 10 minutes
- [REST API reference](https://acme.dev/docs/api.md): Complete API reference with request/response examples
- [CLI reference](https://acme.dev/docs/cli.md): Every command and flag of the acme CLI
## Guides
- [Deploying to production](https://acme.dev/docs/guides/production.md): Scaling, monitoring, and rollbacks
- [Authentication](https://acme.dev/docs/guides/auth.md): API keys, OAuth, and JWT handling
## Optional
- [Changelog](https://acme.dev/changelog.md): Release notes for all past versions Notice the structure: one H1 at the top, one blockquote, a short notes block (no headings), then only H2 sections containing link lists. The file stays small enough to fit in a context window — agents fetch the linked Markdown pages only when they need detail.
llms.txt vs llms-full.txt: What's the Difference?
The official specification defines only llms.txt. llms-full.txt is a widely
adopted convention (pioneered by sites like OpenAI's and Anthropic's docs) for publishing the
complete, expanded version of your documentation — every section in full, not just links to it.
llms.txt | llms-full.txt | |
|---|---|---|
| Status | Defined by the llmstxt.org proposal | Unofficial, community convention |
| Content | Curated index: H1, summary, links to detail | The full content itself, expanded and complete |
| Size | Small — fits in an LLM context window | Large — fetched on demand for deep answers |
| Usage | Entry point: agents read it first | Referenced from llms.txt; fetched when needed |
In practice you add one link to llms-full.txt inside your llms.txt (for
example under an ## Important links section), so agents that need the full picture know
where to find it — without loading it into context by default.
Common llms.txt Format Mistakes (and How to Fix Them)
Here is a file that fails the specification in several ways at once:
Acme Documentation
## What is Acme?
- [Homepage](/)
- [API reference](/docs/api)
# this line was meant to be a comment
## Pricing info
Acme costs $20 per month for the Pro plan. What's wrong, and how to fix it:
- Missing H1. "Acme Documentation" has no leading
#, so the file has no required title element. Fix: start with# Acme Documentation. - Relative URLs.
(/)and(/docs/api)are paths, not addresses. Fix: use absolute URLs like(https://acme.dev/docs/api.md). - Hash-comment misuse. The
# this line was meant to be a commentline starts with#, so parsers treat it as a heading — llms.txt has no comment syntax. Fix: remove it, or use an HTML comment (<!-- ... -->) in the notes area. - H2 used for prose.
## Pricing infocontains a paragraph, but H2 sections must contain file lists of links. Fix: move the prose into the free-form notes above the first##, and keep pricing links (absolute, with descriptions) in the list. - Missing descriptions. Links without a
: notegive agents no hint of what's behind them. Fix: add a short description to every list item.
Not sure if your file is valid? Run it through the free llms.txt validator — it checks the structure against the spec and scores AI-readiness in seconds.
llms.txt Format FAQ
Is llms.txt an official standard?
Not yet. It's an open, community-driven proposal maintained on GitHub by AnswerDotAI (the llmstxt.org authors), not a W3C or IETF standard. That said, adoption is broad and growing — Chrome Lighthouse audits for it, and platforms like Mintlify, GitBook, Wix, and Yoast generate the file automatically.
Where should the llms.txt file be placed?
At the site root, next to robots.txt: https://your-domain.com/llms.txt. It can also live at any subpath (e.g. /docs/llms.txt) to cover only the pages under that path — agents use the most specific file that applies.
How often should I update my llms.txt file?
Whenever your content structure changes meaningfully: new sections, renamed pages, removed or updated documentation. A monthly review is plenty for most sites, and a full regeneration after any redesign. Stale links are the fastest way to lose an agent's trust in your file.
Ready to write a spec-perfect llms.txt?
Generate your file in under a minute, then validate it against the specification — free, no sign-up.