Article

8 minute read

How to Create an llms.txt File: Steps, Template and Examples

A practical guide to create an llms.txt file that AI tools can read: choose the right pages, write useful notes, publish it correctly and check it.

Abstract illustration for How to Create an llms.txt File: Steps, Template and Examples

You can create an llms.txt file in under an hour, but a useful one takes judgement. The file is a short Markdown map that tells AI tools which pages best explain your site. So the work is not typing the syntax. Instead, it is choosing the right pages and saying when each one is worth reading.

This guide walks through the format, six practical steps, a complete example and the mistakes that make a file unreadable. It also covers what llms.txt can't do, because Google has said its search features don't use it. That way you can decide how much effort the file deserves before you start.

What an llms.txt file is

llms.txt is a proposal by Jeremy Howard of Answer.AI, first published at llmstxt.org in September 2024 and revised as version 2 in August 2026. It describes a Markdown file at the root of a site, such as https://www.example.com/llms.txt. The file gives language models a curated reading list instead of a full crawl.

The format is small. An H1 title is the only required element. After it come an optional summary in a blockquote, optional details, and H2 sections that each hold a list of links. Every link can carry a short note after a colon.

Decide whether you need one

Be clear about the payoff first. Google's AI optimization guide says you don't need new machine-readable files, AI text files or Markdown to appear in Google Search. In other words, an llms.txt file is not a ranking or AI Overview lever.

Still, some tools do look for it. Chrome's Lighthouse documentation describes an llms.txt audit that flags server errors when the file is requested. Developer tools and AI coding assistants also read it when a user points them at a docs site. If you publish documentation, a product catalog or a large knowledge base, the file is a cheap experiment.

How to create an llms.txt file in six steps

The steps below follow the order of the file itself. Work in a plain text editor, and save the file as UTF-8 with Unix line endings if you can.

1. Choose the pages that answer real questions

Start with the questions a customer, developer or journalist would ask about your site. Then pick the one page that answers each question best. For a software product, that usually means a quick start, the API reference, pricing, security and the changelog.

Keep the list short. A file with 30 well-chosen links is more useful than one with every URL in your sitemap. If two pages cover the same topic, list the better one and improve or retire the other.

2. Write the title and summary

The first line is the H1 title: a hash, a space and the name of your site or project. Use the name people actually search for, not a slogan. Then add one blank line and a blockquote that says what the site offers and who it serves.

Write the summary for a reader who has never heard of you. For example, > Acme makes invoicing software for freelancers in the US and Canada. is clear, while "the future of finance" says nothing a model can use.

Each H2 heading starts a section, and each section holds a Markdown list of links. Name sections after what a reader wants to do, such as Docs, Guides, Policies or Examples. Avoid internal labels like "Resources 2" that only make sense to your team.

Also keep headings at level two. The proposal does not use H3 or deeper headings inside the file, so a nested heading will confuse a parser. If a section grows too long, split it into two H2 sections instead.

Each item takes the form - [Page name](https://url): note. The note is optional in the format, but it is where most of the value lies. A good note says when the page is the right one to read, for example : Rate limits and error codes for the REST API.

Use absolute URLs that return a 200 status. If you offer clean Markdown copies of pages, version 2 of the proposal lets you link to them by adding .md to the URL or by replacing the extension with .md.

A section named Optional holds links a reader can skip when space is short, such as an archive or a long changelog. In version 2 this is a convention rather than a rule with special processing. Nevertheless, it still signals priority to anyone reading the file.

Put the Optional section last. Then everything above it reads as your core set, and anything below it as background.

6. Publish at the root as plain text

Upload the file so it answers at /llms.txt on the same host as your site. Serve it with Content-Type: text/plain; charset=utf-8 or text/markdown, and make sure the URL returns the file itself, not a redirect to your homepage.

Version 2 also suggests a rel="describedby" link that points to the file, either as an HTML <link> element or as an HTTP Link header. It is optional, but it helps tools find a file that lives in a subfolder.

A complete llms.txt example

Here is a small but complete file for a fictional invoicing product. It uses every element of the format, and each link has a note:

# Acme Invoicing

> Acme makes invoicing software for freelancers in the US and Canada. This file lists the pages that best explain the product, pricing and API.

Prices are in USD. The API docs describe version 3.

## Docs

- [Quick start](https://www.example.com/docs/quick-start): Create an account and send a first invoice
- [API reference](https://www.example.com/docs/api): Endpoints, authentication and rate limits

## Policies

- [Pricing](https://www.example.com/pricing): Plans, limits and what each includes
- [Security](https://www.example.com/security): Data storage, encryption and compliance

## Optional

- [Changelog](https://www.example.com/changelog): Release notes for every version

Notice what the example leaves out. There are no blog tag pages, no login URLs and no campaign landing pages. Every link earns its place.

Common mistakes to avoid

Most broken files fail for the same few reasons. Check for these before you publish:

  • No H1 on the first line: a blank line, a comment or stray HTML before the title breaks the format.
  • An HTML response: a CMS that wraps the file in a page template serves HTML, not Markdown.
  • A soft 404: a missing file that returns your homepage with status 200 looks like a valid file to a crawler.
  • Relative URLs: /docs/api means nothing out of context, so use the full address.
  • A dumped sitemap: hundreds of links with no notes add length without adding guidance.

The first three problems are invisible in a browser, because the page looks fine. That is why a quick technical check matters before you rely on the file.

Check the file before you rely on it

Run two checks after every change. First, validate the format: title, summary, sections and links. Then check delivery: status code, redirects and content type. The table shows what to look for.

CheckPassCommon failure
Status code200 at /llms.txt404, or a redirect to the homepage
Content typetext/plain or text/markdowntext/html from a page template
First lineOne H1 titleBlank line or HTML before the title
LinksAbsolute URLs with notesRelative paths, duplicates, no notes

Keep the file current

An llms.txt file goes stale quietly. Pages move, products launch and old guides lose accuracy, yet nothing breaks visibly. So add the file to the checklist you use when you publish or retire a key page.

If you want to know whether anything reads the file, look at your server logs rather than guessing. Requests for /llms.txt show access, although access alone does not prove that a tool used the content in an answer.

Conclusion

To create an llms.txt file that helps, curate before you format. Pick the pages that answer real questions, write a plain summary, group links into clear sections and give every link a note. Then publish it at the root as plain text and check it after each change.

Finally, keep expectations realistic. The file won't move Google rankings, but it costs little and gives AI tools a cleaner map of your best content. Start with your sitemap today, cut it down to your core pages and validate the result.

Sources

These sources were reviewed on October 7, 2026. The steps and example are independently written by SEOVision and are not results of an experiment.

Frequently asked questions

Quick answers to the questions readers ask most about this topic.

How do I create an llms.txt file?

Write a Markdown file that starts with an H1 title, add a one-sentence summary in a blockquote, then list your most useful pages under H2 sections as links with short notes. Upload it to the root of your site as /llms.txt and serve it as plain text.

Where should the llms.txt file go?

At the root of the host, for example https://www.example.com/llms.txt. Version 2 of the proposal also allows files in subfolders that cover the pages under that path.

Does Google use llms.txt?

No. Google's AI optimization guide says you don't need machine-readable files, AI text files or Markdown to appear in Google Search, including its generative AI features.

How many links should an llms.txt file have?

As few as it takes to answer the main questions about your site. Dozens of curated links with notes are more useful than hundreds of URLs copied from a sitemap.

Can I generate an llms.txt file automatically?

You can generate a first draft from your sitemap, but you still need to cut weak pages, rename sections and write a note for each link before you publish it.

Sources

These references support the platform guidance discussed above. Worked examples are illustrative unless identified as measured results.

  1. llmstxt.org llmstxt.org
  2. llms.txt changes from version 1 to version 2 llmstxt.org
  3. AI optimization guide developers.google.com
  4. Lighthouse documentation developer.chrome.com