How do you write an llms.txt file, and how do you check one?
What llms.txt is for
An llms.txt file follows a public proposal. The llms.txt proposal, published at llmstxt.org, describes a simple Markdown file that helps large language models and AI agents find the most useful information on a website. Web pages are often full of navigation, scripts and adverts, and an AI tool working with a limited context window benefits from a short, curated list of what matters.
It is important to be clear about what the file does not do. Google states in its guide to generative AI search that llms.txt is not needed for AI Overviews or AI Mode and that Google Search does not use it. It is a voluntary convention for tools that choose to read it, not a search ranking signal and not a replacement for robots.txt.
Where the file goes
The file is named `llms.txt` and normally sits at the root of the site, for example `https://example.com/llms.txt`. The proposal also allows files in a subpath, such as `/docs/llms.txt`, covering the pages under that path. Serve it as plain text with a 200 status code so that any tool requesting it receives the file directly.
The format, in order
The proposal sets out the sections in a fixed order:
- An H1 heading with the name of the site or project. This is the only required part.
- A blockquote with a short summary of the site and the key facts needed to understand the rest of the file.
- Optional paragraphs or lists, without headings, giving more detail about the site and how to use the linked pages.
- One or more H2 sections, each containing a Markdown list of links. Each item is a link in the form `name`, optionally followed by a colon and a short note.
- An optional H2 section headed `Optional`, for secondary links that a tool can skip when it needs a shorter context.
An example
Here is a short, valid llms.txt for a small business site:
```markdown # Example Garden Supplies
> Example Garden Supplies sells tools and seeds online and delivers across the UK.
Prices include VAT. Orders placed before 2pm are dispatched the same working day.
Key pages
- Delivery information: Costs, areas and timescales
- Returns policy: How to return an item within 30 days
- Contact us: Telephone, email and opening hours
Optional
```
Keep the summary factual and short. List the pages that answer the questions customers ask most, rather than every URL on the site, which is what an XML sitemap is for.
How to check an llms.txt file
Work through these checks whenever you publish or change the file:
- Request `/llms.txt` directly and confirm it returns a 200 status code and plain text, not an HTML error page or a redirect loop.
- Confirm the first heading is a single H1 and that sections appear in the order the proposal describes.
- Make sure every list item under an H2 is a proper Markdown link, and that notes follow a colon.
- Open every link and confirm it works and points to the right page. Broken links undermine the whole file.
- Check that the summary and notes match what the linked pages actually say.
- Make sure robots.txt does not block the tools you want to read the file, and that no firewall rule blocks the request.
Audit your file
Our LLMs.txt Auditor checks your llms.txt against the llmstxt.org format: an H1 site name on the first line, a blockquote summary, H2 sections, links written as title, address and description, and links pointing to your own domain. It also checks llms-full.txt and robots.txt, flags a conflicting noindex header, and can generate corrected files from your live home page.
Sources
Frequently asked questions
Does Google use an llms.txt file?
No. Google states that Google Search does not use llms.txt files and that they are not needed to appear in AI Overviews or AI Mode. Keeping one will not help or harm your visibility in Google Search. The file is aimed at other AI tools and agents that choose to read it, so treat it as an optional extra rather than a ranking measure.
Should I also provide Markdown versions of my pages?
The llms.txt proposal suggests that pages useful to AI tools should have a clean Markdown version at the same address with .md added, such as page.html.md, or with the extension replaced. This is optional. If you do it, keep the Markdown copy in step with the HTML page so the two never give different information.