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?

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:

  1. An H1 with your site/brand name.
  2. A blockquote summary — one or two sentences on what you are. This is the most important line; make it quotable.
  3. Sections (H2) describing what you do, key facts, and links, each with short bullet descriptions.
  4. 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

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:

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

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.

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