Guide
How to write llms.txt: format, a working template and what it does not do
llms.txt is a Markdown file you place on your site to tell language models and agents what the site is and which pages matter. It comes from a proposal published by Jeremy Howard on 3 September 2024. The page describing it calls itself a proposal, and that is the right way to read it: a convention some tools follow, not a rule any search engine enforces. This guide covers the format as the proposal defines it, gives you a template, and is plain about the limits.
What llms.txt does not do
Start here, because most disappointment with this file comes from expecting the wrong thing. Google states that you do not need to create new machine-readable files, AI text files or Markdown to appear in Google Search, and that applies to AI Overviews and AI Mode as well. Adding llms.txt will not move a Google ranking.
It is also not an access control. The crawler pages published by OpenAI, Anthropic and Perplexity describe robots.txt as the way to allow or refuse their bots; none of those pages lists llms.txt as a control. If your robots.txt blocks a crawler, a beautifully written llms.txt will not be fetched by it.
So why write one? Three practical reasons. Agents and coding tools that do follow the convention get a short, accurate map instead of guessing from navigation menus. People paste the file into an assistant when they want it to work with your product. And writing it forces you to state, in a few sentences with no design to hide behind, what the site offers. If you cannot fill in the template below, the problem is not the file.
The format, as the proposal defines it
The file is plain Markdown. According to the specification, the parts come in this order:
- An H1 with the name of the site or project. This is the only required part.
- A blockquote with a short summary. Put the facts a reader needs to interpret everything else: what you are, where, for whom.
- An optional
Base URL:line that sets the base for relative links. If you write absolute URLs, you can skip it. - Free-form detail: paragraphs or lists, but no H1 or H2 headings, which are reserved.
- H2 sections, each holding a list of links. Every item is a Markdown link, optionally followed by a colon and a note:
- [Link title](https://example.com/page/): what the page contains.
The file normally sits at the root, /llms.txt. The proposal also allows one in a subpath such as /docs/llms.txt, covering the URLs beneath it. Separately, it suggests offering a clean Markdown version of important pages at the same URL with .md appended. That is worth doing for documentation sites; for a small business site it is optional work.
A template you can adapt
Replace every line with your own facts. The shop below is invented for the example; the structure follows the proposal.
# Harbor Street Bikes
> Bicycle repair shop in Busan, Korea. Same-day puncture and brake repairs,
> walk-in or booked online. Open Tuesday to Sunday, 10:00-19:00 KST.
Prices on this site are in Korean won and include VAT. Last reviewed 2026-12-01.
We do not sell bicycles; we repair them.
## Services
- [Repair price list](https://example.com/prices/): every repair with a fixed price and the usual turnaround time
- [Book a repair](https://example.com/book/): online booking form, no account needed
- [E-bike battery diagnostics](https://example.com/e-bike/): which brands we can test and what the report contains
## Guides
- [How to measure a bicycle tyre](https://example.com/guides/tyre-size/): reading ETRTO numbers, with photos
- [Brake pad wear chart](https://example.com/guides/brake-pads/): when to replace, by pad type
## Policies
- [Warranty on repairs](https://example.com/warranty/): 90 days on labour, what is excluded
- [Contact and location](https://example.com/contact/): address, map, phone hoursYou can compare it with the file this site serves, which lists three services, their prices and what each one delivers.
Writing it, step by step
- Pick five to fifteen pages. Choose the ones you would send to a new customer who asked “where do I start?” A list of every URL is a sitemap, and you already have one.
- Write the summary from facts, not adjectives. Location, what you sell, who it is for, hours or delivery area, currency. “Leading provider of innovative solutions” tells a model nothing it can repeat to a user.
- Describe each link by what is on the page. “Repair price list: every repair with a fixed price” beats “Pricing”. The note is what lets an agent decide whether to open the link.
- State what you do not do. One line such as “We do not sell bicycles” prevents a whole class of wrong answers.
- Date it. A “last reviewed” line tells readers how far to trust prices and hours.
Serving the file correctly
Serve it as UTF-8 text with a 200 status. On Cloudflare Pages or Netlify-style hosts a _headers file does it:
/llms.txt
Content-Type: text/plain; charset=utf-8
Cache-Control: public, max-age=3600Then check what a client actually receives:
curl -sI https://example.com/llms.txt
# Expect: HTTP 200 and content-type: text/plain (or text/markdown)
# A text/html answer usually means your host returned the home page instead.
curl -s https://example.com/llms.txt | head -5
# The first line should start with "# " followed by your site name.That check matters more than it looks. Some static hosts answer unknown paths with the home page and a 200 status when the site has no top-level 404 page — Cloudflare Pages documents this single-page-application fallback. On such a site a missing llms.txt “exists”, but it is your home page's HTML. We ran into the same behaviour on two of our own tool sites; the fix is in our cases.
Common mistakes
- Claims that are not on the linked pages. If the file says “free shipping” and the page does not, you have created a contradiction a model may repeat. The file should summarise the site, not extend it.
- Keyword lists. A paragraph of search phrases is noise to a reader that is trying to extract facts.
- Letting it go stale. Old prices in llms.txt are worse than no file. Generate it from the same data as the site, or put it on the checklist for every price change.
- Publishing it while blocking the crawlers. Check robots.txt and your firewall first; the order of work is access, then content, then extras like this file.
- Using H2 for prose. In this format an H2 opens a link section. Keep explanations above the first H2.
- Linking pages that need a login or a script to render. An agent following the link gets nothing useful.
How to tell whether anyone reads it
Look in your server or CDN logs for requests to /llms.txt and note the user agents. That is the only honest measurement. We do not have, and have not seen from any vendor, a published figure for how often assistants fetch this file, so we do not quote one. Treat llms.txt as a twenty-minute task that keeps your own description of the site accurate, then spend the rest of the day on the things that are documented to matter: crawler access and pages worth citing.
Official sources
Every claim about crawler behaviour, policy or markup on this page comes from the pages below, read on 3 December 2026. They change; if this page and a source disagree, the source is right.
- llmstxt.org — The /llms.txt file (proposal)
- Google Search Central — AI features and your website
- OpenAI — Overview of OpenAI crawlers
- Anthropic — Does Anthropic crawl data from the web, and how can site owners block the crawler?
- Perplexity — Perplexity crawlers
- Cloudflare Docs — Pages: Serving Pages (Not Found behavior)