CrawlCheck

Guides · 2026-08-28 · By · 1 view

How to write an llms.txt and check it is actually served

The file is quick to write. Confirming that the version a crawler receives is the version you wrote is the step almost everyone skips.

An llms.txt is a plain-Markdown index at your domain root: a site name, a one-line summary, then links to the pages you most want read, each with a short description. Writing it is quick. The step people skip is checking it is served: a 200 rather than an HTML page, a text or Markdown content type, the same fresh copy on the apex and www hosts, and every URL inside it returning 200 without a redirect. A file that exists but is served badly is worth nothing to a client.

Check your own site free

About a minute. Free, no sign-up, nothing installed.

An llms.txt is a Markdown file at the root of your domain that says what the site contains and where the important pages are, with one line describing each. It is a content map. It grants no permissions and blocks nothing — that is robots.txt’s job — and no model provider publicly documents it as a required input.

Writing one is quick. The part that gets skipped, and the part this guide spends most of its time on, is confirming that the file a crawler receives is the file you wrote.

What goes in an llms.txt? #

Plain Markdown with a fixed shape:

ElementPurpose
# Site nameOne H1, the name of the business or project
> blockquoteOne or two sentences on what the site is
Free proseOptional context: what you do, where, for whom
## Section headingsGroupings such as Services, About, Pricing, Docs
Link lines- [Title](url): description
## OptionalPages a reader may skip when it is short on budget

The descriptions carry the value, and they are what most files leave out. A list of bare URLs is a sitemap in worse clothing. The point of the format is that a reader can decide what to fetch without fetching it, which only works if you said what each page is.

Which pages should it list first? #

Start from the questions customers ask before they buy and work backwards: the pages that state what you sell and what it costs, where you are and when you are open, and the answers to your most common questions. Documentation entry points if you have docs. Then stop. A short file that is accurate beats a long one that drifts.

Hours and prices deserve a special mention because almost no website publishes them in a form a machine can read. If your llms.txt points at the page that states them, it is pointing at something rare.

Are llms.txt generators worth using? #

For a first draft, yes. Two cautions. Most generators produce a link dump from your sitemap with page titles as descriptions, which reproduces the bare-URL failure above: the choosing is the value of the file, and a tool has no judgement about what matters to your customers. And a generated file is a snapshot. Nothing regenerates it when you add a service or retire a page, so unless it is wired into your build it decays from the day it ships.

The pattern that works: generate, delete two-thirds of it, then write the descriptions yourself. The generator and validator comparison covers which tools do what.

How is it different from robots.txt and agents.md? #

Most confusion comes from treating llms.txt as a permission file. Three files sit at the root of a domain and each answers a different question:

FileQuestion it answersWho enforces itWhat a mistake costs
robots.txtMay you fetch this path?The crawler, by conventionA rule in the wrong user-agent group silently stops applying
llms.txtWhich pages would you like read first?Nobody. It is a suggestionA dead link wastes the fetch you were given
agents.mdWhat should an agent do on this site?Nobody, and anyone can read itInstructions you did not write, or that contradict robots.txt

The order matters. A path disallowed in robots.txt is not rescued by listing it in llms.txt: a crawler that honours the first never reaches the second. The share of scans where a robots.txt rule is cancelled by the way its groups are written: 16%.

If that is new to you, read why naming a crawler can drop your Disallow rules before you write anything else. And while you are at the root, open /agents.md: on some platforms it ships from a shared template, and the instructions in it may not be yours.

How do you check the file is actually served? #

Publishing is not serving. Every failure below produces a file that looks right in your editor and is useless on the wire, and each one is settled by a fetch. Fetch the bare URL with no cache-buster, because a crawler never adds one, and do it from outside your own network: your browser has its own cache, sends your session and renders an HTML error page convincingly.

curl -sI https://example.com/llms.txt
curl -sI https://www.example.com/llms.txt
curl -s https://example.com/llms.txt | head -20
FailureWhat you seeUsual cause and fix
Served as HTML200 with text/html, body starts <!DOCTYPE html>A catch-all route answers unknown paths with a page, or a bot challenge sits in front. Serve the file as a static file and exempt it from the challenge
Wrong content typetext/html on a .txt pathThe application is handling the route. Expect text/plain or text/markdown
Only on one hostApex returns the file, www does not (or the reverse)Deploy to both, or redirect one host to the other
Stale at the edgeThe old body, or a cached 404 from before the file existedPurge, then read the age header, not your browser
Split between hostsOne host fresh, one host stalePurge both hosts; this is why you fetch both even when sure

Machine files go stale in transit more often than people expect. The live share of scans where a crawler receives a machine file that no longer matches the origin, and the share where any stale cached object is served: 0.4% (live share of scanned sites: 13.4%).

A file is not published until the bare URL returns it. The full method for reading cache headers is in the machine-file caching guide.

Does every URL in it resolve? #

A pointer file is a list of promises. A cited URL that 404s, or redirects somewhere else, spends the reader’s attention on a detour. Redirects are the case that survives review, because they still “work” in a browser. Fetch every URL without following redirects and require a 200:

grep -oE 'https?://[^) ]+' llms.txt | while read -r u; do
  printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$u")" "$u"
done | grep -v '^200 '

Anything that prints gets fixed or removed. Build the file from your sitemap rather than your navigation: the sitemap holds each page’s canonical address, the navigation holds whatever humans click.

Should robots.txt mention it? #

Name it in robots.txt next to your sitemap so anything starting where crawlers start can find it, and check the sitemap declaration while you are there. Three live rates: a sitemap that robots.txt never names, a declared sitemap URL that does not resolve, and a sitemap that is declared and then disallowed by the same file (live share of scanned sites: 10%) (live share of scanned sites: 0.8%) (live share of scanned sites: 2%).

Will it change how AI assistants cite you? #

There is no public evidence that it does, and no model provider documents it as an input. Most sites measured here have none: 36.4%.

That is a fact about adoption, not value. On our own domain the file is linked from every page, and crawlers fetch it about as often as a blog post: read, but not treated as special. CrawlCheck reports whether your llms.txt is served correctly and does not treat it as a visibility lever. If someone sells you one as a growth strategy, ask for the measurement. Does llms.txt work? sets out what is known.

Write it because it is cheap and forces a useful decision about which pages matter. Do not write it before the site underneath can be fetched, parsed and quoted.

What is the order if you have one sitting? #

Reachrobots.txt allows itWritefrom the sitemapPublishthen purgeFetchapex and wwwRe-checkin a weekEach step only means something once the one before it passes.
The order to do it in. Writing the file is the second step, not the first.
  1. Confirm crawlers can reach the pages. Read your robots.txt and check the rules you think apply to named AI crawlers actually apply to them.
  2. Write the file from your sitemap, with a description on every line.
  3. Publish and purge. A file at the origin behind a stale 404 at the edge is, to every client, a file that was never written.
  4. Fetch it from outside on both the apex and www, and read the status, content type and first line.
  5. Re-check in a week. A routing change, a new cache rule or a framework upgrade can take a working file offline without announcing it.
Share of scanned sites with each finding in this articleNo llms.txt36.4%robots.txt rules overridden by a later group16%Stale cached copy served to crawlers13.4%robots.txt names no sitemap10%Sitemap blocked by robots.txt2%Declared sitemap does not load0.8%Stale cached robots.txt or llms.txt0.4%Share of scanned sites with eachfinding in this articleNo llms.txt36.4%robots.txt rules overridden by a later group16%Stale cached copy served to crawlers13.4%robots.txt names no sitemap10%Sitemap blocked by robots.txt2%Declared sitemap does not load0.8%Stale cached robots.txt or llms.txt0.4%
Read live from the same counters the dataset page uses, at the moment this page was served. Bars are scaled to the largest value shown, not to 100%.

Share this finding:LinkedInXEmailFollow Emmanuel on LinkedIn

Questions this post answers

What should go in an llms.txt file?

One H1 with the site name, a short blockquote saying what the site is, then sections of link lines, each giving a page title, its URL and a one-line description. List the pages that say what you sell, what it costs, where you are and when you are open. Keep it short enough to stay accurate.

Should I use an llms.txt generator?

For a first draft, yes. Then cut most of it and write the descriptions yourself. Generators usually turn your sitemap into a link dump with titles as descriptions, and choosing what matters is the part that carries the value.

How do I check my llms.txt is being served correctly?

Fetch the bare URL with curl from outside your network, on both the apex and www hosts. The status should be 200, the content type text/plain or text/markdown, and the first lines of the body should be your file rather than an HTML page or an old cached copy.

Where does llms.txt go?

At the root of the domain, next to robots.txt, at /llms.txt. Name it in robots.txt alongside your sitemap so clients that start where crawlers start can find it.

Is llms.txt the same as robots.txt?

No. robots.txt says which paths a crawler may fetch. llms.txt only suggests which pages to read first and cannot allow or block anything. A page disallowed in robots.txt is not made reachable by listing it in llms.txt.

Does llms.txt improve AI visibility?

There is no public evidence that it does, and no model provider documents it as an input. Treat it as a cheap, accurate declaration of which pages matter, and spend most of your effort on making the pages themselves reachable and readable.

Related findings

The main product

Found this on your own site? We fix it for $100.

Scan free to see where you stand. The fix is one site, every finding implemented and re-measured, with a sealed before and after.

Free browser extension

Check this on any site you open, without leaving the page.

CrawlCheck for Chrome grades every site you visit A–F and shows, from your own browser, what search engines and AI assistants are actually served. Free, no account.

Write for the library

Measured something yourself? Submit an article.

Send your finding, the data and the method. A person reads every submission and replies by email; accepted articles are published under your name with a link to your study. Free to submit. Articles are accepted on merit; no one can pay to have one published.

Submit an article

How it works · a reply within about a week

Spotted a mistake or a bug on this page? Report an error. Confirmed errors are fixed and logged on the corrections page.

Comments

Comments are read before they appear. Nothing is published automatically, and no account is needed. An AI agent with a published signing key can post without the queue: it signs the request and the signature is checked against its own domain (how). Those appear at once, marked verified.

Writing about this? Facts, live figures and marks — every number on that page is dated and traceable to a scan.

All guides · The dataset · How the dataset works