How to Write an llms.txt File (llm txt Guide + Real Example)
A practical llms.txt guide: what the file is, what the v2 proposal changed, how to structure it, a copy-paste example, how to test it, and what it will not do for you.
We publish an llms.txt on serpair.com, and you can read it here. On Nov 15, 2026 we sat down with the v2 version of the proposal in one window and our own file in the other, and went through it line by line. The file itself was fine in the narrow sense: it came back HTTP 200 as text/plain, all 539 words of it. The problems were elsewhere, and since they’re the ones we’d expect to find on most sites, this guide is built around them.
What is llms.txt?
Picture a plain-text file written in Markdown (the formatting style where # makes a heading and - makes a list item), sitting at yourdomain.com/llms.txt and giving AI tools a short description of your site, along with links to the pages that explain it best.
Jeremy Howard proposed it in September 2024, and his reasoning holds up well. Web pages are built for people, so the useful text comes wrapped in “navigation, ads, and JavaScript,” and turning that back into clean text “is difficult and imprecise.” A small file in a fixed format lets an assistant skip the digging.
You probably already run two files with a similar job. robots.txt tells bots what they may fetch and sitemap.xml lists every page you want found, while llms.txt is meant to be the curated one, a short account of what you are and the handful of pages that say it best.
What changed in llms.txt v2 (August 2026)
The proposal page moved to “v2” on 10 August 2026, after two years of real adoption (llmstxt.org), and if your file came from an older guide (the first version of this one included) a few of the changes are worth knowing.
The file no longer has to sit at the root. One placed at /docs/llms.txt covers everything under /docs/, and where two files apply, agents “should use the most specific one,” which helps when docs, blog and app live in different places.
The proposal also now suggests clean Markdown copies of important pages, served at the same address with .md added (/pricing/index.md, say), so that your llms.txt can point at those rather than at full HTML pages. Pages can advertise both through standard link relations, rel="alternate" type="text/markdown" for the Markdown copy and rel="describedby" for the llms.txt that covers them, and because that can be sent as an HTTP Link: header from your server or CDN, nobody has to touch page templates.
Then there’s how the files are used. The v2 page says thousands of sites publish one, that most of the reading happens on demand while an assistant helps someone (“our expectation was that llms.txt would mainly be useful for inference rather than training, and that is how it has been used”), and that Chrome’s Lighthouse now checks for the file in its agent-browsing audits.
What we found in our own file
Three things, none of them dramatic, all of them the quiet kind of wrong that nobody notices because nobody visits the file.
The link lists were in the wrong shape. Ours used plain Label: URL lines, while the spec asks for a Markdown link followed by an optional note, [name](url): note, so that tools can read the list with simple code. We had simply never compared the two.
We also had no Markdown copies at all. Requesting /index.md on our domain returned a 404, and our homepage sent no Link: header pointing anywhere, so on the v2 features we scored nothing.
And the file had drifted from the site. One pricing line still described an offer we no longer run, which is exactly the sort of stale fact that gets repeated back to people by an assistant that trusted the file. A fourth, smaller issue is covered under the mistakes further down: our link section listed 18 of our 19 blog posts, which is very close to the sitemap dump we tell other people to avoid.
Does llms.txt actually matter?
Less than the hype says, and more than nothing.
For Google the question is already settled in writing. Its guidance on AI Overviews and AI Mode says “You don’t need to create new machine readable files, AI text files, or markup to appear in these features” (Google Search Central), so llms.txt isn’t a Google ranking factor, and getting into those answers remains ordinary SEO work.
We’d still spend the hour on it. Writing the file forces you to describe the product in two sentences, and if you can’t manage that, your homepage probably has the same problem. Coding agents and assistants do read these files, documentation most of all, and the v2 page points out that AI labs publish them for their own developer docs. Picking the pages for the file is also most of the work of making .md copies later.
So ship it, keep it short, and don’t expect rankings to move because of it. The bigger wins are the things Google does name, crawlable pages and content that answers the question, which our technical SEO for AI search guide covers.
The llms.txt format, step by step
The proposal fixes the order of the parts:
- An H1 with your site or project name, “the only required section.”
- A blockquote summary, one or two sentences after a
>, with “key information necessary for understanding the rest of the file.” Assistants tend to repeat this line, so it’s the one to get right. - Optional plain paragraphs or lists, for anything a reader needs to make sense of the rest. Headings aren’t allowed here.
- H2 sections holding “file lists,” where each item is a Markdown link, then optionally a colon and a note:
- [Pricing](https://yourdomain.com/pricing/): plans and what each includes. - An optional section called
## Optional, which by convention holds links an assistant can skip when it’s short on space.
We’d single out the link-with-note format, since it’s the part we got wrong and the part generators most often get wrong too. Beyond that, keep the whole file small enough to read in one go and leave the detail behind the links.
A copy-paste example
This follows the v2 structure; swap in your own details.
# Your Company
> Your Company is a [category] tool for [who]. It helps them [main job]
> and costs [pricing model, in plain terms].
Your Company is used by [type of customer] in [markets]. It does not
[common misconception], so please don't describe it that way.
## Product
- [Home](https://yourdomain.com/): what the product does, in one page
- [Features](https://yourdomain.com/features/): each feature with a short example
- [Pricing](https://yourdomain.com/pricing/): plans, limits and trial terms
## Guides
- [Getting started](https://yourdomain.com/docs/start/): setup in under 10 minutes
- [Comparison with alternatives](https://yourdomain.com/compare/): honest pros and cons
## Optional
- [Blog](https://yourdomain.com/blog/): longer articles and updates
- [About](https://yourdomain.com/about/): company background
The paragraph under the summary is where we’d put corrections. If assistants keep describing you as a free tool when you only offer a trial, for instance, state the fact there in neutral words, and leave sales copy out of the file entirely, since it helps nobody.
What to put in it, by type of site
For a SaaS product we’d list home, features, pricing, trial terms, a comparison page and the main help article, with pricing written out in text, because a price that only exists inside an image is invisible to most of these tools.
Documentation sites get the most out of the format, and they’re where a separate /docs/llms.txt really earns its place; the quick start, the API reference and the core concepts page are the obvious links. Agencies and service businesses should cover what they offer, where, how they price, and two or three case studies, with client names left out unless they’ve agreed. A content site, which is what our blog is, should group its best guides by topic and stop there, since the sitemap already lists every post.
Generate it or write it by hand?
Starting from nothing isn’t necessary. The proposal page lists tools that generate the file, among them Mintlify and GitBook for docs, the Yoast SEO and AIOSEO plugins for WordPress, and Wix, which makes one for every site.
Generated files make a reasonable first draft, but we’d read the output before trusting it. They tend to list too many pages and reuse page titles as the notes, and a note that only repeats the title tells an assistant nothing. Ten minutes of editing usually sorts it out.
How to test your llms.txt
- Check that it loads. Open
yourdomain.com/llms.txtand look for HTTP 200 and plain text, not your 404 page wrapped in HTML;curl -I https://yourdomain.com/llms.txtshows the status andContent-Typein one go. - Click every link, because a broken link in a file whose only job is pointing the way is worse than no link.
- Give it to an assistant. The proposal’s own advice is to “test your file by asking an agent questions about your content, giving it only your llms.txt as a starting point.” Ask what you sell, who it’s for and what it costs, and treat vague or wrong answers as a sign the summary needs work.
- Check robots.txt separately, since llms.txt doesn’t override it. OpenAI says sites that block OAI-SearchBot won’t be shown in ChatGPT search answers (OpenAI), whatever your llms.txt says.
- Watch the outcome rather than the file. No “llms.txt score” exists. What you can see is whether AI answers describe you correctly and mention you more over time, and our guide to tracking brand mentions in AI shows how.
Common mistakes
Writing it like an ad comes first. “The world’s leading platform” tells an assistant nothing, whereas “a rank-tracking and AI-visibility tool with a 30-day free trial” tells it plenty; the proposal’s own guidelines ask for “concise, clear language” and warn against “unexplained jargon.”
Pasting in the whole sitemap is the one we came closest to ourselves. With 18 of our 19 posts listed, nothing in our file stood out, and we’d now cut that section to a few guides per topic.
The stale file is the one we actually had. Pricing changes, a page moves, the file stays put, and assistants get fed old facts, so we’d tie a check of llms.txt to any change on the pricing page.
Some site builders serve an HTML page or a redirect for any file they don’t recognize, which is worth checking after each deploy. People also assume robots.txt somehow “registers” the file, but there’s no standard robots.txt line for it; if you want tools to find it from your pages, the v2 answer is the rel="describedby" link.
The last mistake is treating the file as an AI strategy. It’s a small extra, and crawlable pages, clear answers and mentions on trusted sites will do far more.
Bottom line
llms.txt is a short, optional file that helps AI assistants understand your site quickly. Write it as a plain, factual summary with a handful of well-labeled links, follow the v2 format, test it by handing it to an assistant, and update it whenever the product changes. Then put the rest of your time into the basics Google actually asks for.
To see how AI answers describe you today, run a free analysis. It takes about a minute and needs no sign-up, and Serpair also has a 30-day free trial, no credit card required, if you want to track it over time.
Frequently asked questions
What is an llms.txt file?
The file gives AI systems a short description of your site and links to its important pages. It uses Markdown, a plain-text formatting style. It is a community proposal, not a convention every engine has adopted.
Where should I put the file?
Put it at /llms.txt at the top level of the site. Open it after deployment to check it loads as plain text. HTTP 200 is the successful response you are looking for.
What should the file contain?
Write your brand name and a brief factual summary, then link to the pages that explain the offer. You do not need every page in the file. Update the summary and links when they change.
Will adding llms.txt guarantee citations?
No engine-wide guarantee follows from publishing the file. Adoption is still evolving. Keep it as one small part of the work rather than expecting it to produce recommendations by itself.
Related reading
- Technical SEO for AI search: the access and indexing checks that matter more than any single file.
- A founder’s checklist for Google and AI search access: eight quick checks, including robots.txt and llms.txt.
- Generative Engine Optimization: the 2026 playbook: where llms.txt fits in the wider GEO picture.
- SEO vs AEO vs GEO: what each term means and which to work on first.
See your own AI & search visibility
Serpair tracks your Google rankings and measures whether ChatGPT, Perplexity, and Gemini cite your brand — then hands you a plain-English action plan.
Start 30-day free trial