← All tools

GEO tutorial

How to Write an llms.txt File

How do I write an llms.txt file? Write it the way a helpful human would summarise your site to a stranger: one title, one paragraph saying what the site is for, then grouped links to the pages that matter most, each with a short, factual description. This guide builds a complete file in about twenty minutes, then shows how to check it before you publish.

Free tool

Open the llms.txt Validator

Draft the file below, then paste it in and get a 0–100 score with a fix for every failed check.

Validate now

Step 1: Write the H1 and the summary first

Every llms.txt file starts with an H1 — a single line starting with one hash — naming the site and what it does, followed by a short summary paragraph marked with a greater-than sign. This is the most-read part of the file: when an AI system summarises your site, it will lean heavily on these two lines. Write the summary for a stranger, not for a search engine. Say who the site is for, what it offers, and what makes it different, in one or two sentences, using plain words. “Free browser tools for indie developers: formatters, checkers and launch utilities” works. A paragraph stuffed with keywords, superlatives and every product name you own does not — it reads like noise, and noise is what an AI reader skips first.

Step 2: Choose sections, not a list of everything

Group your links under H2 headings — lines starting with two hashes — such as Tools, Guides and Pricing. Three to five sections are usually enough, and each should hold only the pages a first-time reader genuinely needs. A common mistake is listing every page on the site: on a large site that turns the file into a second sitemap, and a reader that meets a wall of links learns nothing about which pages matter. Pick your flagship pages — the tools people come for, the guides that answer the most common questions, the pages that convert — and leave the rest out. If a page would not help a stranger understand or use your site, it does not belong in the file, however proud of it you are.

Step 3: Write link descriptions that say something

Each link follows the same shape: a bracketed title, a full absolute URL in parentheses, a colon, then a short description. Use absolute URLs — a relative path pasted into another context points nowhere. Write descriptions that answer “what will I get if I open this?” rather than repeating the title: “Score an llms.txt file and fix failed checks” beats “llms.txt validator tool” because it tells the reader what the page does. Keep each description to one line, keep the facts accurate, and do not promise outcomes the page cannot deliver. A description that overclaims — guaranteed ranking, guaranteed citations — is worse than a plain one, because it teaches the reader not to trust the rest of the file.

Step 4: Keep it short, then decide about llms-full.txt

Aim for a file a human could read in two minutes: roughly 20–40 links for most small sites, fewer if your site is small. If you have long-form documentation that genuinely helps an AI reader answer questions, the convention also allows an optional llms-full.txt — a much longer file with full page content — linked from the short file. Most sites do not need it yet: start with the short file, keep it accurate, and add the long version only when you have documentation worth quoting in full. A short, accurate file beats a long, stale one every time, because the reader's trust in the file is built link by link.

A complete example to copy

Replace the example pages with your own, keep the shape, and keep descriptions factual and specific:

# Example Tools
> Free browser tools for indie developers: formatters, checkers and launch utilities.

## Tools
- [JSON Formatter](https://example.com/json-formatter): Format and validate JSON in your browser.
- [llms.txt Validator](https://example.com/llms-txt-validator): Score an llms.txt file and fix failed checks.

## Guides
- [How to Write llms.txt](https://example.com/how-to-write-llms-txt): Write an llms.txt file from scratch, step by step.
- [How to Validate llms.txt](https://example.com/how-to-validate-llms-txt): Check a finished file and fix failed checks.

Step 5: Publish, validate, and keep it in sync

Save the file as llms.txt at your site root — for example, https://example.com/llms.txt — not in a subfolder and not behind a login. Before you announce it, paste the draft into the validator and fix what fails: a missing summary, a broken link, a duplicate URL. Also check that robots.txt does not block the AI crawlers you want to reach; a perfect file behind a blocked door helps nobody, and our AI Crawler Access Checker shows which named AI crawlers can reach your site root. Finally, treat the file as a living page: add new flagship pages when they launch, remove retired ones, and re-check after any redesign or migration, when URLs are most likely to have quietly changed. If you already have a file and want to audit it instead, read the companion guide on how to validate your llms.txt file.