Sub topic 5
What `llms.txt` Is For
Prerequisites
This chapter assumes that you understand how a website is served over HTTP, can read basic Markdown, and know that AI assistants retrieve information from websites. You should also distinguish a crawler from an AI model. A crawler fetches web pages. A model processes information that may have been collected from those pages.
The problem `llms.txt` tries to solve
llms.txt is a proposed convention for giving AI systems a short, curated map of a website's important content. The proposal was introduced by Jeremy Howard in 2024. It is usually placed at the website root:
https://example.com/llms.txtMany websites contain navigation menus, advertisements, cookie notices, repeated headers, and several versions of the same information. An AI system that reads a page directly must decide which text matters. An llms.txt file lets the site owner recommend the pages that provide the clearest context.
The file is aimed mainly at documentation sites, software projects, and other information-rich websites. It can point an AI assistant toward a quickstart guide, API reference, tutorials, and important background material.
llms.txt is a recommendation list. It does not replace the pages it links to.
What the file contains
The proposed format uses ordinary Markdown. A typical file has:
- An H1 heading naming the project or website.
- A short summary.
- Optional explanatory text.
- H2 sections containing Markdown links.
- Descriptions explaining what each linked page contains.
- An optional section for material that can be skipped when context is limited.
For example:
# Example Docs
Documentation for the Example library, a Python client for the Example API.
## Core documentation
- [Quickstart](https://example.com/docs/quickstart.md): Install the library and make a first request
- [API reference](https://example.com/docs/api.md): Endpoints, parameters, and error codes
- [Authentication](https://example.com/docs/auth.md): Configure API keys and permissions
## Optional
- [Changelog](https://example.com/changelog.md): Release historyThe links should lead to stable, readable pages. Markdown links are common because Markdown is easy for automated systems to parse. The proposal does not require a special database, API, or crawler protocol.
How it fits into retrieval
An assistant or retrieval system could fetch llms.txt, select relevant links, and then retrieve those pages. The file can reduce discovery work and provide the site's preferred reading order.
This is only a possible workflow. A crawler or assistant may ignore the file, fetch other pages, or use a different source entirely.
What it is not
llms.txt is not an access-control mechanism. It does not prevent a crawler from requesting a page. It does not authenticate visitors, block training collection, or impose a legal restriction by itself.
It is also not a guaranteed search-ranking or AI-citation signal. Publishing the file does not ensure that an assistant will cite the website or rank it higher. Its value depends on whether consumers choose to read it and whether the linked content is accurate and useful.
| Mechanism | Main purpose | Enforced by the file itself? |
|---|---|---|
| `llms.txt` | Curate useful content for AI systems | No |
| `robots.txt` | State crawler access preferences | No |
| Authentication | Restrict access to authorized users | Yes, when correctly implemented |
Use llms.txt when a maintained content guide could help automated readers. Use authentication, network controls, or a web application firewall when blocking access is a requirement.
Exercise
A company publishes /llms.txt and expects all AI crawlers to stop fetching its documentation. What is wrong with this plan?
Show answer
llms.txt describes preferred content; it does not control access. The company needs crawler rules and, for reliable blocking, enforced controls such as authentication or firewall rules.