How to Create an llms.txt File: 7 Steps

How to Create an llms.txt File: 7 Steps
Quick answer. To create an llms.txt file: write a Markdown file whose only required element is an H1 with your site name, add a blockquote summary, group your best pages under H2 sections as Markdown links with one-line descriptions, put skippable content under ## Optional, and save it to your web root so it serves at https://yoursite.com/llms.txt as plain text rather than HTML.

Read the full guide instead

This page is the short checklist. The complete reference — a real annotated llms.txt file, the format spec line by line, llms.txt vs llms-full.txt, and 15 days of our own server-log data on which crawlers actually fetch these files — lives in llms.txt Examples, Format, and llms-full.txt Explained.

What are the steps to create an llms.txt file?

  1. Pick the pages. Choose the 20–50 pages you would actually want an AI model to quote. Not every page — llms.txt is a curated index, not a sitemap.
  2. Write one line per page. Each description should say what the page answers, not repeat its title. "Webhooks: reliable event delivery and signature verification" beats "Webhooks".
  3. Group into 3–6 H2 sections. Order them the way you would brief a new hire: orientation first, reference later.
  4. Put skippable content under ## Optional. The spec gives that exact heading special meaning — an agent short on context is allowed to drop everything beneath it.
  5. Add the H1 and a blockquote summary. The H1 (your site or project name) is the only element the spec actually requires. The blockquote is a one- or two-sentence description of what you do.
  6. Save it to your web root. public/llms.txt in Next.js, static/llms.txt in Hugo or Docusaurus, the same directory as robots.txt on a static host.
  7. Verify it. curl -sI https://yoursite.com/llms.txt should return 200 with a text/plain or text/markdown content type. If it returns text/html, a framework catch-all route is intercepting the path — the single most common deployment mistake, affecting 40% of the files Common Crawl measured.

What does a minimal llms.txt file look like?

This is the whole format. Everything after the H1 is optional:

# Acme Docs

> Acme is a payments API for online businesses. These pages cover
> integration, refunds, webhooks, and fees.

## Getting started

- [Quickstart](https://docs.acme.com/quickstart.md): Five-minute integration with the JavaScript SDK
- [Authentication](https://docs.acme.com/auth.md): How to obtain and use API keys

## Core concepts

- [Payment intents](https://docs.acme.com/payments/intents.md): The recommended payment object lifecycle
- [Webhooks](https://docs.acme.com/webhooks.md): Reliable event delivery and signature verification

## Optional

- [Changelog](https://docs.acme.com/changelog.md): Release notes