What llms.txt Does and How to Write One
See a real llms.txt index, write a focused Markdown file for documentation, and distinguish agent navigation from Google Search visibility.
A developer asks a coding assistant to look up a library method. Giving it a short index of maintained references can save a detour through outdated tutorials. That is a concrete use for llms.txt. If the business goal is to appear in Google AI Overviews, Google explicitly says it ignores this file for Search visibility and rankings. Google’s AI optimization guide.
Read an Index That Exists
Open Cloudflare’s public documentation index and find the entry for Workers. It points to a narrower index for that product. A developer who needs Workers documentation can give their assistant that smaller reference and ask it to open the relevant pages. You can inspect both files yourself. Cloudflare’s documentation index · Workers documentation index.
Version 2 of Jeremy Howard’s proposal describes a Markdown file that can cover a whole site or a section such as /docs/. A site can advertise the relevant index with a describedby link relation. The proposal also describes Markdown alternatives for individual pages. These are publishing choices for a site that wants to help agents navigate its material. The llms.txt proposal.
Chrome Lighthouse also documents an agentic browsing audit for the root file. A server error is flagged. A missing file that returns 404 is marked “Not Applicable.” Passing the audit establishes that the optional resource can be retrieved under those conditions. Chrome’s llms.txt audit.
Decide What You Want the File to Do
| Reader’s Task | Where to Start | What You Can Verify |
|---|---|---|
| Give a coding assistant a current reference | A short index linking to documentation for the supported version | Open the index and check which reference the assistant followed. |
| Make a page eligible for Google AI Overviews | The page itself, its indexing status, and Search Console settings | Use the Google AI Overviews guide. |
| Manage permission for a named crawler | The relevant robots group and provider policy | Check the URL and bot in the robots.txt guide. |
A provider publishing an index for developers tells you something about its documentation. It does not establish that its consumer assistant routinely consults other websites’ indexes when choosing citations. For ChatGPT, Claude, or Perplexity, describe the workflow you actually verified. A log entry for one request establishes that someone fetched the file.
When Is It Worth Creating?
An llms.txt file is most attractive when a site has a lot of information that is hard to navigate, such as a software documentation library, a complex product catalog, or detailed public policies. A small local business website with five pages may already be easy to understand through its navigation and clear service pages.
Before creating a file, ask:
- Do visitors or support staff struggle to find the right page?
- Are the important pages current, public, and stable?
- Can you maintain the file when content changes?
- Will a concise list add value beyond the existing navigation or sitemap?
- Can you test whether AI tools or referrers actually use it?
If the answers are mostly yes, it can be a modest, low-cost addition. If not, spend that time fixing the underlying pages first.
How to Write a Useful File
Start with the website’s name and a short description of its purpose. Add only the context an outside reader needs to choose among the links. Then group the most important pages under descriptive headings. Link labels should explain what the page contains, not simply repeat “here.”
Here is a small index for a documentation team to adapt. The links use a reserved example domain.
# Export Documentation
> Public reference for exporting records and checking the resulting file.
## Export a File
- [Export procedure](https://example.com/docs/export): Start an export and download it.
- [File format](https://example.com/docs/format): Column names, units, and encoding.
## Optional
- [Older formats](https://example.com/docs/archive): Reference for retired versions.
Try the index with a concrete request: “Which page defines the units in the exported file?” A reader should be able to pick the file-format reference without opening the archive. If the guide sends them to an old format, change the labels or split the versions. Confirm the answer against the linked page. A good index can still point to a stale specification.
The example deliberately omits a homepage, careers page, and blog archive. Add a link when you can name a question it helps someone answer. For a real deployment, check each URL without a staff login and with the access level an outside reader would have.
Choose Pages and Keep Them Current
Prioritize pages that answer recurring, high-value questions. For a service company, that might be eligibility, process, service area, pricing method, policies, or contact details. For a publisher, it may be an editorial overview and a handful of original references. For software documentation, it may include installation, core concepts, API reference, troubleshooting, and version information.
Do not include every URL simply because it exists. Duplicates, retired pages, thin articles, and temporary campaign pages make the file harder to use. Revisit the list when a service changes, an old page is removed, or a new authoritative resource replaces an earlier one.
If you use a content management system to generate the file, make sure the generator does not expose unpublished content or restricted paths. Use canonical public URLs, check links after a migration, and confirm that the file returns a normal successful response at the expected location.
Measure It Like an Experiment
Record the date you publish the file and the reason for creating it. Open the published URL. The AI crawler checker also checks for the root file. If you published a section index, inspect its exact path separately. If you monitor server logs, look for requests to /llms.txt, while remembering that a request does not prove the content influenced an answer.
Try the documentation task both ways. Give a colleague the public docs homepage and ask them to find the current export format. Give another colleague the index and the same question. Record the pages they opened, whether they found the right version, and whether the answer includes the units. A second pair can reverse the starting points. This tells you whether the index helps with the task you wrote it for.
If you test with a coding assistant, start a fresh conversation for each run. Save the URLs it actually opened. An assistant that answers correctly from a familiar example without opening the index tells you little about the index’s usefulness. One that opens the index, chooses the archive, and gets the units wrong gives you something specific to edit. Retest with the same question after you label the current release more clearly.
Keep a separate record for unsolicited requests in server logs. A person on your team pasting the file into a chat is evidence about a deliberate workflow. An unfamiliar client fetching it is evidence about discovery. Neither observation identifies how a public search engine chose its sources. Judge the experiment by whether readers can now complete the documentation task you set out to improve.
Frequently Asked Questions
Can I Publish a Separate Index for My Documentation?
Yes. Version 2 of the proposal permits a file to describe the pages under its path. Link to the index that covers the documentation you want a reader to use.
Does Listing a Page Grant Permission to Read It?
The file points readers to resources. Authentication still governs access to restricted pages, and robots directives express crawl preferences.
Get New Posts by Email
New research and guides on how AI answers choose which businesses to mention. We send a link to confirm first, and you can unsubscribe at any time.
Check Your AI Visibility
Track how AI answers describe your business with Mentioned, or check which AI crawlers your site allows.