All articles
6 min read

How to Write an llms.txt File (With a Copy-Paste Template)

llms.txt is a markdown map of your site's key content for AI models. What it is, what it isn't (not robots.txt), and a template you can copy today.

An llms.txt file is a plain-text markdown file that sits at your site's root and gives AI models a curated map of your most important content: what your site is, in one short summary, plus an organized list of the pages that matter most. Where robots.txt manages crawler access and sitemap.xml handles search-engine discovery, llms.txt handles guidance — it hands a language model the reading list you'd want it to have.

Let's clear up the most common misconception first, because it changes how you write the file: llms.txt is not a permissions file. It doesn't allow or block anything, and it doesn't use User-agent or Disallow rules — that's robots.txt syntax, and access control still lives there. (We cover which AI crawlers to allow or block in robots.txt separately.) An llms.txt file assumes the model is already welcome on your site, and answers a different question: now that you're here, what should you read?

Where did llms.txt come from?

The proposal came from Jeremy Howard of Answer.AI in September 2024, and it solves a real mechanical problem. Language models work with limited context windows, and the average web page is a terrible use of that budget — navigation, cookie banners, scripts, and layout markup bury the actual content. A model that has to parse all that noise across dozens of pages to figure out what your site offers is a model that will often get you wrong.

llms.txt fixes this by giving models one clean, predictable place to look. It's written in markdown — a format language models read natively — and it's short enough to fit in context alongside the user's actual question.

Why should a business publish one?

Three reasons, in descending order of certainty:

  • Clarity you control. The summary line in your llms.txt is your elevator pitch, in your words. When an AI system reads it, it gets your positioning — not whatever it reconstructs from your homepage's hero section.
  • Better answers about you. AI assistants and agent tools that fetch your site can jump straight to your pricing, docs, or key guides instead of wandering. A number of developer tools already fetch llms.txt files when users point them at a site.
  • Cheap insurance. The file takes about twenty minutes to write and costs nothing to host. If AI engines standardize on it, you were early. If they don't, you've lost twenty minutes — and produced a genuinely useful one-page summary of your site in the process.

That last point deserves honesty: no major answer engine has committed to using llms.txt in its ranking or citation decisions. Adoption is real but early — Anthropic publishes one for its documentation, and platforms like Mintlify generate them automatically for the docs sites they host. Treat it as a low-cost, forward-leaning move, not a magic visibility switch.

Where does the file go?

At your site root, always: yourdomain.com/llms.txt. Like robots.txt, the location is the contract — tools look for it at exactly that path, and an llms.txt buried in a subdirectory might as well not exist.

There's also an optional companion, llms-full.txt, which inlines the complete text of your key pages rather than linking to them. It's mostly used by documentation sites; for a typical business site, the standard file is plenty.

What goes inside? The format, piece by piece

The format is deliberately minimal. Four building blocks, in order:

  1. An H1 with your site or product name. The only required element.
  2. A blockquote summary. One or two sentences on what the site is and who it's for. This is the single most valuable line in the file — write it like you'd answer "so what does your company do?"
  3. Sections (H2 headings) containing link lists. Each link is a markdown bullet: the page name, the URL, and a short description after a colon explaining why the page matters.
  4. An optional section literally titled "Optional." Links a model can skip when its context budget is tight.

A copy-paste llms.txt template

# Your Business Name

> One or two sentences: what you do, who it's for,
> and what makes you different.

## Core pages

- [Product](https://example.com/product): What it does and the main use case.
- [Pricing](https://example.com/pricing): Plans, what's included, free tier details.
- [About](https://example.com/about): Who's behind it and why.

## Guides

- [Guide name](https://example.com/guides/topic): The question this answers.
- [Another guide](https://example.com/guides/other): The question this answers.

## Optional

- [Changelog](https://example.com/changelog): Release history.

Swap in your own domain, list your five to ten most important pages, and you're done. For a live example, AccessKnight's own file is at accessknight.com/llms.txt — an H1, a one-sentence summary of what the scanner does, a section on what it checks, core pages, and pricing. That's the whole trick: it should read like a well-organized index card, not a config file.

llms.txt vs robots.txt vs sitemap.xml: what's the difference?

FileAudienceJob
robots.txtAll crawlersAccess control — who may fetch which paths
sitemap.xmlSearch enginesDiscovery — every URL you want indexed
llms.txtAI models and agentsCuration — what the site is and which pages matter most

They're complementary, not competing. A page can be open to crawlers in robots.txt, listed for indexing in your sitemap, and highlighted as essential reading in llms.txt — three files, three different jobs. None of them substitutes for another.

What should you do next?

Write the file. It's a twenty-minute job: start with the H1 and the summary blockquote, add your most important pages with one-line descriptions, and upload it to your site root.

Then look at the layer beneath it. An llms.txt can point AI at your best pages, but it can't fix pages the models struggle to parse once they arrive. That deeper layer — crawler access, semantic structure, and AI readability as a whole — is measurable. AccessKnight's free scan scores it alongside WCAG accessibility, so you can check whether the pages you're recommending are actually readable when the machines show up.

Frequently Asked Questions

What is an llms.txt file?

An llms.txt file is a plain-text markdown file at a website's root that gives AI models a curated summary of the site: a name, a one-to-two-sentence description, and organized links to its most important pages. It was proposed by Answer.AI's Jeremy Howard in 2024 as a standard way to make sites easier for language models to understand.

Is llms.txt the same as robots.txt?

No. robots.txt controls which crawlers may access which paths, using User-agent and Disallow rules. llms.txt controls nothing — it's guidance, a curated map for models that are already allowed in. The two files complement each other, and both live at your site root.

Where do I put my llms.txt file?

At your site root, so it resolves at yourdomain.com/llms.txt. Tools look for it at that exact path, the same way crawlers look for robots.txt.

Do AI engines actually read llms.txt?

Some tools do; no major answer engine has committed to it. Adoption is early — AI companies and documentation platforms publish them, and several developer tools fetch them — so treat it as a low-cost, forward-looking practice rather than a guaranteed visibility lever.

What is llms-full.txt?

A companion variant that inlines the complete text of your key pages instead of linking to them, so a model can read everything without extra fetches. It's most common on documentation sites; most business sites only need the standard llms.txt.

What should I list in my llms.txt?

Your five to ten most important pages: what you do, pricing, key guides or docs, and contact or signup. Give each link a short description so a model knows why the page matters, and put nice-to-have links under an "Optional" section.

Check your website's accessibility

Scan against all 33 WCAG 2.1 rules and get code-level fix suggestions — free.

Run a free scan

Keep reading