How to Create an llms.txt File (Step by Step)

tb

tobecited

Editorial team • 6 min read • Aug 11, 2026 • Updated Aug 12, 2026

To produce an llms.txt file, create a plain Markdown document containing four required elements — an H1 heading with the site name, a blockquote with a one-line summary, H2 sections that group links to key pages, and a short description after each link — then place it at the domain root as yoursite.com/llms.txt. Budget under an hour, including review.

This guide addresses implementation only. If you are still weighing whether to publish the file — adoption figures, who reads it, the honest case for and against — that analysis is in What is llms.txt and does your site need one?. This guide assumes the decision is made and covers solely the construction: the exact structure the specification demands, a complete example, deployment per platform, validation, and the mistakes that render the file ineffective.

What structure does the llms.txt specification require?

The specification at llmstxt.org defines a fixed skeleton; the order of parts is not negotiable:

  1. An H1 heading containing the site or project name — this is the only element the specification designates as strictly required.
  2. A blockquote placed immediately after the H1, containing a one-paragraph summary of what the site is and who it serves.
  3. Optional plain paragraphs or lists providing context that does not fit into the summary.
  4. H2 sections, each containing a Markdown link list in the form [Page name](url): one-line description.
  5. An H2 section with the literal name Optional, which has reserved semantics: links an AI assistant may skip when its reading budget is constrained.

The decision to use Markdown rather than XML or JSON is deliberate. Language models parse Markdown natively — it survives tokenization with its structure intact and imposes no parsing overhead compared to rendered HTML. The specification fits on a single page; read it once before writing.

How do I write the file, step by step?

  1. Enumerate every page a first-time visitor with purchase intent would need: product, pricing, documentation, FAQ, about, contact.
  2. Reduce the list to 5–15 links. llms.txt is curation, not enumeration; if every page is important, no page is.
  3. Write one factual sentence for the blockquote: what the site is, who it serves, and one concrete fact such as a price or a location.
  4. Write a description for each link — what the reader learns there, in under fifteen words, after a colon.
  5. Assemble the parts in the order the specification mandates: H1, blockquote, H2 sections, Optional last.
  6. Save the result as a UTF-8 plain-text file named llms.txt.

Here is a complete, valid file for an imaginary project management SaaS:

llms.txt
# Brightpath

> Brightpath is a project management tool for construction teams.
> Plans start at $12 per user per month; API and mobile apps included.

## Product

- [Features](https://brightpath.app/features.md): Scheduling, budgets, and site reports
- [Pricing](https://brightpath.app/pricing.md): Plans, limits, and trial terms

## Docs

- [API reference](https://brightpath.app/docs/api.md): REST endpoints and authentication

## Optional

- [Blog](https://brightpath.app/blog.md): Product updates and industry guides

Note the .md link targets: where clean Markdown versions of pages exist, the specification prefers them because they are far cheaper for a model to ingest than full HTML. Linking the standard HTML pages is acceptable if you have no Markdown versions.

Where do I put the file on my platform?

The file must resolve at the domain root — https://yourdomain.com/llms.txt — the same convention that robots.txt follows. Tools look for it at that exact path; a file in a subdirectory will never be discovered. Deployment varies by stack:

  • Static sites and frameworks such as Next.js, Astro, or Nuxt serve everything in the public/ directory (or its equivalent) from the root — place llms.txt there and deploy.
  • WordPress sites need the file uploaded to the web root next to robots.txt via the hosting file manager or SFTP; several plugins can also generate and serve it.
  • Hosted platforms that do not permit root file access require checking the platform's documentation for custom root files or an app that serves them; a redirect from /llms.txt to a hosted file functions as a fallback, but a direct 200 response is preferable.

Verify the deployment from the command line:

bash
curl -sI https://yourdomain.com/llms.txt

Expect an HTTP 200 status and a text/plain or text/markdown content type. An HTML content type indicates that your platform routed the request to a rendered page — which defeats the purpose of the file.

How do I validate the finished file?

No official validator exists — llms.txt is a proposal, not a ratified standard accompanied by a test suite. A manual checklist covers the points that matter:

  • The URL returns raw Markdown: opening it in a browser displays plain text, not a styled page.
  • Every link in the file resolves with a 200 status; a dead link wastes the small fetch budget an assistant allocates to your site.
  • The summary sentence matches what the site sells today, including any prices you chose to state.
  • The file has an owner and an update trigger: whenever a key page, price, or product name changes, llms.txt changes in the same release.

Which mistakes make the file useless?

  • Dumping the entire sitemap into it. Enumeration is the job of sitemap.xml; llms.txt is editorial selection, and a 500-line file is as useless as no file.
  • Writing marketing copy. A model summarizes — it does not applaud. "Award-winning innovative solutions" contains zero retrievable facts; product names, prices, and capabilities contain many.
  • Linking pages whose content appears only after JavaScript execution. Most AI fetchers read raw HTML and execute nothing; link pages that render their facts server-side.
  • Letting the file rot. A stale price in llms.txt is worse than no file, because a model will repeat it with confidence.
  • Expecting a ranking boost. No major provider has confirmed reading the file, and Google has stated it does not use it — publish it as cheap optionality, not as an SEO tactic.

Frequently asked questions

Between 5 and 15 links serves most business sites. The specification imposes no limit, but the file's value lies in selection. Documentation sites are the legitimate exception: a manual with forty well-described pages remains a curated map, not a dump.

Should I also create llms-full.txt?

Only if you operate a documentation-heavy site. llms-full.txt inlines the full text of your content into a single file so a model can load everything in one request — AI coding assistants rely on it heavily. For a typical business site, the curated link list in llms.txt suffices.

Can I generate llms.txt automatically?

Yes — generators exist, and our free AI visibility audit drafts an llms.txt from your live pages as one of its ready-to-paste fixes. Treat any generated draft as a starting point: the selection of which ten pages define your business is a judgment call, and that judgment is where the file's value resides.

The file is live — is the rest of your site AI-readable?

llms.txt represents one hour of work and the smallest component of AI visibility. The larger question is measurable: when a buyer asks ChatGPT or Claude for the best option in your market, does the answer name you or a competitor? Run the free audit — it asks AI assistants real buyer questions, shows exactly which brands they name, and delivers ready-to-paste fixes, this file included. Three minutes, and the result is a verifiable fact, not a score. Want the measurement without the product? How to check if AI mentions your brand documents the manual grid — ten questions, three assistants, one spreadsheet.

#llms.txt#AI crawlers#technical SEO#how-to