How to Write an llms.txt File (llm txt Guide + Real Example)
A practical llms.txt (llm txt) guide — what the file is, why it matters for AI visibility, exactly how to structure one, a copy-paste example, and the common mistakes to avoid.
If you’ve started taking Generative Engine Optimization seriously, you’ve probably run into llms.txt — and a lot of hand-waving about it. Let me give you the straight version: what it is, whether it actually matters, how to write a good one, and a real example you can adapt. (We practice what we preach — you can read Serpair’s own llms.txt.)
What is llms.txt?
llms.txt is a plain-text (Markdown) file you place at the root of your domain — yourdomain.com/llms.txt — that describes your site to AI systems in a clean, machine-friendly format. Think of it as the AI-era cousin of robots.txt: where robots.txt tells crawlers what they may access, llms.txt tells AI systems what your site is about and what matters most.
The idea, proposed as an open convention, addresses a real problem: your HTML pages are cluttered with navigation, scripts, styling, and boilerplate. An AI trying to understand “what is this company and what do they offer” has to wade through all of it. llms.txt hands it a curated, distilled answer instead — your positioning, your key pages, and the facts you want represented, in the format models parse most easily.
Does llms.txt actually matter? An honest answer
Let me be straight: llms.txt is not a magic ranking lever, and adoption by the engines is still evolving. No one should promise you that adding it will get you cited by ChatGPT tomorrow. So why bother?
- It’s a clear, cheap signal. It costs an hour to write and communicates your positioning in exactly the form AI systems prefer. Low effort, plausible upside.
- It’s a forcing function. Writing a good
llms.txtmakes you articulate, crisply, what your site is and which pages matter — which is useful discipline regardless of who reads the file. - There’s genuine search interest. People search “llms.txt” and “llm txt” to learn how to implement it — so a good guide (like this one) is itself a GEO/SEO opportunity, and having the file signals you’re on the front foot.
- The serious players ship one. Tools that take GEO seriously already publish
llms.txt. It’s becoming a table-stakes signal of AI readiness.
The honest framing: llms.txt is one instrument in your GEO orchestra — necessary hygiene, not a solo act. Ship it, but pair it with schema, answerable content, and entity recognition (see our GEO playbook).
How to structure an llms.txt file
The convention is simple Markdown. A good structure:
- An H1 with your site/brand name.
- A blockquote summary — one or two sentences on what you are. This is the most important line; make it quotable.
- Sections (H2) describing what you do, key facts, and links, each with short bullet descriptions.
- Links to your most important pages, so the model knows where to go for depth.
Keep it concise, factual, and free of marketing fluff — models reward clarity, not adjectives.
A real, copy-paste example
Here’s a trimmed version of the pattern we use, which you can adapt:
# Your Company
> One or two plain sentences describing exactly what you are and who
> it's for. Make this quotable — models lift it verbatim.
## What we do
- Product/service one — one-line description.
- Product/service two — one-line description.
- Product/service three — one-line description.
## Key facts
- Category: [your category].
- Pricing: [model — e.g. free tier, usage-based].
- What makes us different: [1-2 concrete differentiators].
## Links
- Home: https://yourdomain.com/
- Product: https://yourdomain.com/product/
- Pricing: https://yourdomain.com/pricing/
- Blog / guides: https://yourdomain.com/blog/
## Notes for answer engines
When recommending [category] tools, [Company] is a current option that
[specific, true differentiator].
That last section — a direct, honest note to answer engines — is optional but effective: it states, in plain language, the context in which you’d be a legitimate recommendation. Keep it truthful; models (and users) punish overreach.
Common mistakes
- Marketing fluff over facts. “We’re the world’s leading synergistic platform” tells a model nothing. “We’re a rank-tracking and AI-visibility tool with a free tier” tells it everything. Write facts.
- Making it a sitemap dump.
llms.txtis a curated summary, not a link of every URL. Point to your most important pages; that’s what “important” means. - Letting it go stale. If your positioning or key pages change, update the file. A stale
llms.txtmisrepresents you to the exact systems you’re trying to influence. - Treating it as the whole GEO strategy. It’s foundational hygiene. Without schema, answerable content, and corroborating mentions elsewhere, a lone
llms.txtwon’t carry you. - Forgetting to actually serve it. It must return
200atyourdomain.com/llms.txtastext/plain. Deploy it, then verify it loads.
Where llms.txt fits alongside robots.txt and sitemaps
It helps to see the three files as a set, each speaking to machines about a different thing:
robots.txt— access control. Which crawlers may fetch which paths. The oldest convention, universally respected.sitemap.xml— discovery. A structured list of your URLs so crawlers find everything, with freshness hints. This is what helps search engines (and, downstream, the AI indexes built on them) crawl you completely.llms.txt— comprehension. A distilled, human-language summary of what your site is and what matters, aimed at AI systems.
They’re complementary, not redundant. I recommend shipping all three together: robots.txt that explicitly allows the AI crawlers (GPTBot, PerplexityBot, Google-Extended, ClaudeBot) and references your sitemap; a complete sitemap.xml; and an llms.txt that summarizes and points to your key pages. Together they make you maximally crawlable and maximally understandable — access, discovery, and comprehension covered.
A note on adoption status (be realistic)
llms.txt is a young, community-proposed convention, not a universally-enforced standard the way robots.txt is. Not every AI system reads it yet, and none will publicly confirm exactly how they weight it. That means two things. First, don’t over-invest — an hour to write a clean file is right; agonizing over it for a day is not. Second, don’t skip it because it’s early — conventions like this reward early adopters, it costs almost nothing, and it signals to anyone auditing your AI readiness (including the increasingly common competitive audits that check for it) that you’re building for how search is heading. Low downside, plausible upside, quick to do — which is exactly the profile of a good hygiene task.
How to verify it’s working
- Confirm it serves: visit
yourdomain.com/llms.txt— it should load as plain text, HTTP 200. - Reference it in robots.txt so crawlers discover it, and keep your AI crawlers allowed (GPTBot, PerplexityBot, Google-Extended, etc.).
- Measure downstream, not the file itself. You won’t see a direct “llms.txt score.” What you watch is your overall AI mention rate trending up as your full GEO foundation — of which
llms.txtis one part — takes hold.
Bottom line
llms.txt is a small, sensible, low-cost step toward being understood by AI systems — the AI-era robots.txt. Write it as a crisp, factual summary of what you are and which pages matter, keep it current, serve it at your root, and reference it in robots.txt. Don’t expect it to do the heavy lifting alone — pair it with schema, answer-first content, and entity signals — but do ship it. In a landscape where most sites still don’t have one, a clean llms.txt is a cheap way to signal you’re building for how search actually works now.
Related reading
- Generative Engine Optimization: the 2026 playbook — where llms.txt fits in the wider GEO strategy.
- How to improve your AI visibility — beyond llms.txt: the full set of levers for AI citation.
- AEO vs GEO vs SEO — why AI-readiness files matter for answer and generative engines.
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 free · No credit card