Skip to content

How to write an llms.txt file

SEO1 min readFixes 2 checks llms-txt-valid, llms-txt-present

A plain-text index of your best pages for AI assistants: an H1, a summary line and sections of Markdown links. It takes about ten minutes; treat it as a cheap bet, not a ranking factor.

Step by step, with screenshots: AI crawlers and robots.txt: who fetches your site and how to decide →

Check your own site

Runs these 2 checks and the other 185, free, in about 45 seconds.

What a passing site looks like

  • llms.txt follows the llmstxt.org formatwarning · −0.5 ptseffort S
  • llms.txt foundinfo onlyeffort S

1. llms.txt format

Why it matters. An llms.txt that is not in the expected shape (an H1 first, links grouped under sections, served as text) is skipped by the tools that read it, so it does nothing.

How to fix it.
  1. Start the file with "# Site name", follow with an optional "> summary" line, then "## Section" headings each holding "- [Page title](https://…): one-line description" entries.
  2. Serve it with a text/plain or text/markdown content type and keep it under 100 KB; put long content in /llms-full.txt instead.

2. llms.txt file

Why it matters. /llms.txt is a plain-text index of your most useful pages written for AI assistants, in the format proposed at llmstxt.org. It is optional and new: a few tools read it, but no major assistant has confirmed using it and Google has said Search does not. It costs about ten minutes, so treat it as a cheap bet, not a ranking factor.

How to fix it.
  1. Create /llms.txt: an H1 with the site name, a one-line blockquote summary, then "## Section" headings with Markdown links to your key pages and a short description each.
  2. Serve it as text/plain or text/markdown; optionally add /llms-full.txt with the full text of those pages.

Filed under Technical SEO. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.