Guide · 4 min read

How to write an llms.txt file

A step by step way to write an llms.txt file that points AI engines at the pages on your site that actually answer questions, and where to put it.

By Citedon · Reviewed August 6, 2026
Quick answer

To write an llms.txt file, list the pages that answer real questions, write it in markdown with an H1 site name, a short summary, and link lists under H2 sections each with a description, then host it at yourdomain.com/llms.txt. It is a proposed convention, not a rule any engine must obey, and no major engine publishes documentation committing to read it. Check whether your SEO plugin already generates one before you write your own.

You can spend a week perfecting one page and still leave an engine to crawl your whole site to find it. An llms.txt file is the note you leave at the front door saying here are the pages worth reading first.

It is a plain text file. Writing it well takes more thought than writing it takes time.

What an llms.txt file is

An llms.txt file is a markdown file at your domain root that points AI engines at your most useful pages. It is to engines roughly what a sitemap is to crawlers, but written for a reader that wants the signal, not the full index.

It is a proposed convention, and the honest state of support matters before you spend an hour on it. The specification says it makes no recommendation for how the file should be processed, and as of 2026-08-06 we could not find published documentation from OpenAI, Google, Perplexity or Anthropic committing their answer engines to fetch or honor it. What you are writing is a clear, machine-readable offer, not a delivery route. The fuller picture, including the separate llms-full.txt convention, is in llms.txt vs llms-full.txt.

It also does not replace good pages. At best it saves a machine some guessing about which of yours are worth reading.

Check whether you already have one

Open yourdomain.com/llms.txt before you write anything.

On WordPress there is a fair chance a file is already there that you never wrote, because All in One SEO, Yoast and Rank Math now generate one. In our sample of 500 small-business websites, 36 of the 101 llms.txt files we found carried an SEO-plugin signature, so a large share of the adoption in that data is a plugin default rather than an owner's decision.

If a file is already being served, edit or replace it rather than publishing a second one. And if it lists every page you have ever published, that is the plugin default, not a curated index, and curating it is the actual work below.

Do the task

Step 1: List the pages worth pointing to

Be ruthless. Your core product page, your pricing, your strongest guides, the few articles that genuinely answer a question. Leave out thin pages, near-duplicates, and utility pages. The value of this file is that it is short and high signal.

Step 2: Write it in markdown

The shape is simple. An H1 with your site or company name. A short blockquote that says what you do in one or two sentences. Then H2 sections grouping related links, each link followed by a plain-language description of what that page answers.

A machine should be able to read a line and know which question that page settles.

Step 3: Keep it honest

Only link pages that exist and that say what your description claims. If you write "pricing for all plans" the page had better show pricing for all plans. A confident description that does not match the page teaches a machine to distrust the file.

Step 4: Place it at the root

Save it as llms.txt and host it at yourdomain.com/llms.txt. That is the same convention as robots.txt, so an engine that looks for it knows exactly where to look.

Step 5: Maintain it

When you publish a page that matters, add it. When you retire one, remove it. A signpost pointing at a 404 is worse than no signpost.

The old way and the new way

The old way was to publish pages and hope an engine crawled its way to the right ones, treating discovery as the engine's problem.

The new way hands the engine a short, honest map of your best answers. It takes an hour, it makes your own priorities explicit, and it is worth something even if no engine ever fetches the file. What it does not do is guarantee anything looks.

The honest part

llms.txt is a convention, not a law. No engine is required to fetch it or honor it, none of the major ones documents that it does, and writing one does not make any engine cite you. If your linked pages are thin, a tidy index of thin pages just helps a machine confirm they are thin faster.

So the file is the easy half. The pages it points to have to actually answer something. The automated apply, with a preview and a per-fix approval, runs only through the connected Citedon plugin on WordPress. On any other platform you upload the file yourself, which for a single text file is no real burden.

Where to start

Before you write the file, find out which of your pages an engine can read at all. Run a free scan to see how the four engines read your key pages today, then write your llms.txt to point at the ones that hold up.

See whether AI engines can read your key pages.
Run a free scan. No signup. You get a readiness score and the gaps to fix, in about a minute.