Answer

llms.txt file best practices

An llms.txt file is a Markdown file at your root domain that curates the pages you want language models to read. Best practices: one H1 with the site name, a blockquote summary, then H2 sections of annotated Markdown links to your most important docs. Link to .md versions, cut marketing copy, keep it short, and keep it current as the site changes.

Overview

An llms.txt file is a Markdown file you place at your root domain, at /llms.txt, to tell language models which pages on your site matter and how they relate. Jeremy Howard of Answer.AI proposed the format in September 2024. The file is not a crawl rule like robots.txt. It is a curated map: one H1 with your site name, a blockquote summary, then H2 sections of annotated links to your most important documentation, guides, and references. Written well, it becomes the version of your site a model reads first.

Why the file exists, and what it is not

Questions

Asked often.

Where should the llms.txt file be placed?

At the root of your domain, reachable at example.com/llms.txt, served with a text content type. Models that support the format check the root path first, the same way they check for robots.txt. A file placed in a subdirectory or behind a redirect generally will not be discovered. Confirm it returns a 200 status at the root before you consider it shipped.

Is llms.txt the same as robots.txt?

No. robots.txt controls which URLs a crawler is allowed to fetch, a permission layer. llms.txt does the opposite job: it hands a language model a curated reading list of the pages you most want it to use when building an answer. One governs access, the other guides attention. They can coexist, and a complete setup usually ships both files serving different purposes.

What format should an llms.txt file use?

Markdown, encoded as UTF-8. The proposal specifies a single H1 with your site name, a blockquote summary, optional context paragraphs, then H2 sections of annotated Markdown links. Markdown is readable by people and parses cleanly for models at the same time. Reserve a final H2 named Optional for links a model can skip when its context window runs short.

What is the difference between llms.txt and llms-full.txt?

llms.txt is a short, curated map: a list of annotated links to your most important pages. llms-full.txt is the full concatenated text of your documentation in one Markdown file, so a model can pull your whole corpus in a single fetch instead of following links. Publish the short map for routine use and the full file as the heavy reference a model reaches for when it needs depth.

How do I test whether my llms.txt file works?

Feed the file to the AI answer engines you care about and ask each to describe your product from the file alone. If the description is wrong, vague, or missing your core offering, the file has the same gap. Then check the mechanics: a 200 at the root, every linked URL resolving to readable content, and valid Markdown with one H1. Fix and retest.

Have a harder question?