Technical

llms.txt Explained: What It Is and How to Write One (with Example)

If you want AI search engines to understand your site without guessing, llms.txt is the lowest-cost, highest-leverage file you can ship. Here is what it is, why it matters for generative engine optimization, and exactly how to write one — with a copy-paste example.

The GenAI Ranker Team 7 min read

The short version

  • llms.txt is a Markdown file at your site root (/llms.txt) that hands LLMs a curated, machine-readable map of your most important pages and canonical facts.
  • It was proposed by Jeremy Howard and the team at Answer.AI in 2024 as a convention, not an official web standard.
  • The format is plain Markdown: an H1 with your brand name, an optional blockquote summary, free-form context, then H2 sections of Markdown link lists like - [Title](url): notes.
  • It complements — does not replace — robots.txt, sitemap.xml, and structured data.
  • Adoption is still emerging: not every AI engine consumes it yet, but it is cheap to ship and forward-looking.

What is llms.txt?

llms.txt is a single Markdown file you place at the root of your domain — reachable at https://yourbrand.com/llms.txt. Its job is to give large language models a clean, curated, machine-readable map of the content and facts you most want them to use when they read, summarize, or recommend your brand. Think of it less as a crawl-control file and more as a briefing document written for an AI reader.

The convention was proposed in 2024 by Jeremy Howard and the team at Answer.AI. The motivating problem is simple: a modern marketing page is mostly navigation, scripts, banners, and boilerplate, with the actual substance buried in the middle. A human skims past the noise effortlessly; an LLM working from a limited context window can waste most of its budget on chrome before it ever reaches your value proposition. llms.txt is the curated answer to that — you decide what matters and point the model straight at it.

llms.txt is a convention, not a mandate

There is no governing body that ratified llms.txt, and search engines are not obligated to read it. It is a community proposal that has gained traction. Treat it as a forward-looking signal you control, not a guaranteed ranking input.

Why llms.txt matters for GEO

Generative engine optimization (GEO) is about being accurately understood and confidently cited by AI answer engines like ChatGPT, Perplexity, Claude, and Google's AI surfaces. We cover the full discipline in our generative engine optimization guide, but the short story is that AI engines reward clarity. A well-written llms.txt helps on three fronts:

  • It reduces ambiguity. When you state your canonical facts plainly — what you do, who you serve, your pricing model, your differentiators — the model has less room to hallucinate or paraphrase you incorrectly.
  • It points crawlers at your best content. Instead of hoping a model lands on your strongest explainer, you list it explicitly with a one-line description of why it matters.
  • It states facts unambiguously, in the model's native format. LLMs are trained heavily on Markdown. Giving them clean Markdown with no layout noise plays directly to how they parse text.

This is closely tied to how AI chooses which brands to recommend: engines favor sources they can extract clean, consistent, attributable facts from. llms.txt is one of the cheapest ways to become that kind of source.

The llms.txt format, section by section

The spec is deliberately minimal and built entirely from standard Markdown so both humans and machines can read it. A valid file follows this order:

  1. 1An H1 with the name of the site or project. This is the only required element.
  2. 2An optional blockquote (a line starting with >) giving a short summary with the key information needed to understand the rest of the file.
  3. 3Optional free-form sections — zero or more paragraphs and lists providing extra context. These must not use H2 headings, so they stay distinct from the link sections below.
  4. 4H2 sections that each contain a Markdown list of links. Each list item follows the form - [Title](url): optional notes about the link.
  5. 5An optional `## Optional` section at the end. Links placed here are explicitly lower priority — a signal that a model can skip them if its context budget is tight.
# Your Brand Name

> A one-sentence summary of what you do and who you serve, written so an AI can quote it verbatim.

A short paragraph or two of free-form context. State your canonical
facts here: what the product is, the core use cases, the pricing model.
Do not use H2 headings in this free-form block.

## Docs

- [Getting Started](https://yourbrand.com/docs/start): the fastest path to first value
- [API Reference](https://yourbrand.com/docs/api): full endpoint and auth reference

## Guides

- [How It Works](https://yourbrand.com/how-it-works): the core concept explained
- [Pricing](https://yourbrand.com/pricing): plans and what each tier includes

## Optional

- [Changelog](https://yourbrand.com/changelog): release history (skip if low on context)
- [Press Kit](https://yourbrand.com/press): logos and brand assets
The minimal llms.txt skeleton

The llms-full.txt convention

Alongside llms.txt, many sites also publish a companion file named llms-full.txt. Where llms.txt is a curated index of links, llms-full.txt inlines the actual content — typically the full Markdown of your key docs and pages concatenated into one large file. The idea is that a model can ingest your entire knowledge base in a single fetch without crawling page by page. Use llms.txt as the navigable map and llms-full.txt as the complete dump for tools that prefer to load everything at once.

Keep llms-full.txt honest

Because llms-full.txt can get large, generate it from your real source content rather than hand-maintaining it. A stale full dump that contradicts your live pages is worse than no file at all — it gives models conflicting facts to choose from.

How to write your llms.txt, step by step

  1. 1List your highest-value URLs. Pull the pages that best explain what you do and best answer the questions buyers ask — your core explainer, docs, pricing, and a few flagship guides. Quality over quantity; this is a curated list, not a sitemap dump.
  2. 2Write the H1 and summary blockquote. Use your exact brand name in the H1. In the blockquote, state your positioning in one clean sentence an AI can lift word for word.
  3. 3Draft the free-form context. Add a short paragraph of canonical facts: category, primary use cases, who it is for, and your pricing model. Be specific and avoid marketing fluff that an LLM cannot verify.
  4. 4Group your links into H2 sections. Common groupings are Docs, Guides, Product, and Company. Give every link a colon note explaining what it is and why it matters.
  5. 5Add an Optional section. Move nice-to-have links (changelog, press kit, legal) under ## Optional so models know they are lower priority.
  6. 6Validate the Markdown. Make sure every link resolves, the H1 is present, and there are no H2 headings inside your free-form context block.
  7. 7Host it at the root. Deploy the file so it is served at https://yourbrand.com/llms.txt with a text/plain or text/markdown content type.

If you would rather not hand-write the file, an llms.txt generator can scaffold one from your sitemap — but always review the output. The whole point is curation, and a generator does not know which three pages actually matter to your buyers.

A realistic llms.txt example

Here is a complete, filled-in example for a fictional SaaS brand, Northwind Analytics, a product-analytics tool for B2B teams. Notice how every link earns its place and the notes are written to be quoted.

# Northwind Analytics

> Northwind Analytics is a product-analytics platform that helps B2B SaaS teams see which features drive retention, without needing a data engineer to set it up.

Northwind Analytics is a self-serve product-analytics tool built for B2B
SaaS companies between 10 and 200 employees. Teams use it to track feature
adoption, build retention cohorts, and trace the events that lead to upgrades.
It installs with a single JavaScript snippet and offers per-seat pricing with
a free tier up to 10,000 monthly tracked events.

## Product

- [How Northwind Works](https://northwind.example.com/how-it-works): the event-and-cohort model in plain language
- [Feature Adoption Reports](https://northwind.example.com/features/adoption): how to measure which features retain users
- [Retention Cohorts](https://northwind.example.com/features/cohorts): building and reading cohort tables
- [Pricing](https://northwind.example.com/pricing): free tier plus per-seat plans, billed monthly or annually

## Docs

- [Quickstart](https://northwind.example.com/docs/quickstart): install the snippet and send your first event in 5 minutes
- [Event Tracking API](https://northwind.example.com/docs/api/events): reference for the track and identify calls
- [Integrations](https://northwind.example.com/docs/integrations): Segment, Snowflake, and webhook setup

## Guides

- [Defining Your North-Star Metric](https://northwind.example.com/guides/north-star): a worked framework for B2B teams
- [Reducing Churn With Cohorts](https://northwind.example.com/guides/churn): step-by-step cohort analysis

## Company

- [About Northwind](https://northwind.example.com/about): who we are and who we serve

## Optional

- [Changelog](https://northwind.example.com/changelog): release notes
- [Security and Compliance](https://northwind.example.com/security): SOC 2 and data-handling details
- [Press Kit](https://northwind.example.com/press): logos and boilerplate
A filled-in llms.txt for a sample SaaS brand

Where llms.txt fits with your other files

llms.txt does not replace anything you already have — it complements your existing machine-readable layer. Each file answers a different question for a different consumer:

  • `robots.txt` tells crawlers what they are *allowed* to access. It is about permission, not curation.
  • `sitemap.xml` lists *every* indexable URL for completeness. llms.txt is the opposite: a short, opinionated shortlist of what matters most.
  • Structured data (Schema.org / JSON-LD) marks up facts *inside* a given page. llms.txt operates at the site level, pointing to those pages. The two reinforce each other — see our deep dive on structured data for GEO.

Used together, these files give AI engines a permission layer, a full index, page-level facts, and a curated highlight reel. That combination is the backbone of the playbook we lay out in our GEO strategies for 2026.

Set expectations honestly

As of now, support for llms.txt across AI engines is uneven and still evolving. Some tools read it, some ignore it, and behavior changes month to month. Ship it because it is cheap, low-risk, and forward-looking — not because it guarantees citations today.

Measure whether it is working

The honest way to know if your llms.txt is helping is to track how AI engines actually describe and cite your brand over time. That is precisely what GenAI Ranker measures — our methodology runs real prompts across multiple engines and tracks whether your canonical facts are being reproduced accurately. Ship your llms.txt, then watch whether the facts you stated start showing up verbatim in AI answers.

Ready to put this into practice? Run a free AI visibility scan to see how engines describe your brand today, then explore the GenAI Ranker features that track your GEO progress as you ship your llms.txt and the rest of your machine-readable layer. Start with the scan, fix what it surfaces, and let the data tell you what to write next.

Frequently asked questions

What is llms.txt?

It is a Markdown file placed at your site root (`/llms.txt`) that gives large language models a curated, machine-readable map of your most important content and canonical facts. It was proposed by Jeremy Howard and Answer.AI in 2024 as a community convention.

How do I write an llms.txt file?

Start with an H1 of your brand name, add an optional blockquote summary, write a short free-form block of canonical facts, then add H2 sections containing Markdown link lists in the form `- [Title](url): notes`. End with an optional `## Optional` section for lower-priority links, and host the file at your domain root.

Where should I put llms.txt?

At the root of your domain, served at `https://yourbrand.com/llms.txt`. Serve it as plain text or Markdown. It lives alongside `robots.txt` and `sitemap.xml` rather than replacing them.

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

`llms.txt` is a curated index of links with short notes. `llms-full.txt` inlines the actual full content of your key pages into one large Markdown file, so a model can ingest your whole knowledge base in a single fetch instead of crawling page by page.

Do AI engines actually use llms.txt?

Support is emerging and uneven. Some tools read it, others do not yet, and behavior is still evolving. It is worth shipping because it is low-cost and forward-looking, but it does not guarantee citations today — measure your actual AI visibility to see what is working.

TG

The GenAI Ranker Team

GEO research & product

𝕏

Find out how AI sees your brand

Run a free scan to see your AI-search visibility score across every major engine — and exactly what to fix first.

Run my free scan

Keep reading