Guide

How to create an llms.txt file

An llms.txt file takes about ten minutes to write. This guide walks through every part, in order, and ends with a file you can paste and adapt.

1. Start with the H1 title

The first line must be a single H1, the name of your project or site. It is the only strictly required element of the format.

# Acme Docs

2. Add a blockquote summary

Right under the title, add a one- or two-sentence blockquote. This is the context a language model reads first, so make it specific: what the site is and who it's for.

> Acme is a payments API. This file links to the docs an LLM needs to integrate and debug Acme.

3. (Optional) Add a few lines of prose

Before any section heading you may add plain paragraphs with extra orientation. Don't use headings here; keep it to a sentence or two.

4. Group your links under H2 sections

Each section is an H2 heading followed by a markdown list. Every item is a link with an optional description after a colon.

## Docs

- [Quickstart](https://acme.com/docs/quickstart): Integrate in five minutes
- [API reference](https://acme.com/docs/api): Every endpoint and parameter

## Examples

- [Sample app](https://acme.com/examples/app): A working end-to-end example

Use absolute https URLs, and keep descriptions focused on what a developer or model needs instead of marketing copy.

5. Use the "Optional" section for nice-to-haves

A section named ## Optional is the convention for secondary information: links an agent can skip when a shorter context is needed. Put changelogs, blog posts, and secondary references here.

6. Host it at the root: or at the path it covers

Serve the file at https://yourdomain.com/llms.txt with Content-Type: text/plain. It can also live at a subpath, covering the pages under it: /docs/llms.txt describes everything in /docs/, and agents prefer the most specific file that applies (see what changed in spec v2). Large sites often also publish a llms-full.txt with the full expanded content.

7. Let pages point at it

So agents don't have to guess the URL, advertise the file from your pages with <link rel="describedby" href="/llms.txt">, or the equivalent Link: response header, which you can set once in your CDN config.

8. Validate before you ship

Paste your domain into the validator. It checks the structure, confirms every link actually resolves, and lists exactly what to fix. Aim for 100/100. From the command line, the quickest check that the file is really being served, and not a catch-all route returning your homepage, is the content type:

curl -sI https://yourdomain.com/llms.txt | grep -i content-type
# text/plain; charset=utf-8   ✓
# text/html; charset=utf-8    ✗ a page answered instead of the file

The finished file

Everything above, assembled. Copy it, replace the names and URLs, and you have a valid llms.txt:

# Acme Docs

> Acme is a payments API. This file links to the docs an LLM needs to
> integrate and debug Acme.

Built for developers integrating card and bank payments. Start with the
quickstart; the API reference is the authority on every parameter.

## Docs

- [Quickstart](https://acme.com/docs/quickstart): Integrate in five minutes
- [API reference](https://acme.com/docs/api): Every endpoint and parameter
- [Authentication](https://acme.com/docs/auth): Keys, scopes and rotation

## Examples

- [Sample app](https://acme.com/examples/app): A working end-to-end example
- [Webhooks recipe](https://acme.com/examples/webhooks): Verifying signatures

## Optional

- [Changelog](https://acme.com/changelog): Release notes by version
- [Blog](https://acme.com/blog): Background reading, rarely needed

That is the whole format: a title, a summary, sections of annotated links. If you would rather start from something real, the generator reads your homepage and sitemap and drafts a first version you can edit down.

Keep reading

Validate your llms.txt →