What Is llms.txt and How Do You Write One? With a Working Example
llms.txt is a plain Markdown file that sits in your site's root directory. Its purpose is to tell language models, at a glance, what the site is, what it is competent in and which pages carry the most value.
Why is it needed?
When a language model visits your site it has to separate the navigation menu, cookie notice, social widgets and the actual content out of raw HTML. That extraction is both costly and error-prone. llms.txt removes the noise: it offers a clean, hierarchical summary that is easy for a machine to read.
The file is not a mandated standard; it is a voluntary signal. But because its cost is close to zero, it is one of the first steps applied in GEO work.
File structure
The format is deliberately simple. It starts with a single H1, includes an optional summary block, and continues with link lists separated by H2 headings.
# Brand Name
> A single clear sentence. What do you do, and for whom?
A short explanatory paragraph. Location, founding year, areas of expertise.
## Services
- [Service name](https://site.com/service): One-line description.
## Guides
- [Article title](https://site.com/blog/post): What the article teaches.
## Contact
- [Contact](https://site.com/contact): E-mail and phone.
## Optional
- [Legal pages](https://site.com/terms-of-use)
What each section means
- H1: Brand or project name. There should be exactly one.
- Blockquote (>): A definition the model can quote directly. This is the single most critical line.
- H2 blocks: Logical groups. Each link should carry a short description after a colon.
- Optional: Links under this heading are treated as skippable when the context window fills. Put legal pages here.
Seven rules when writing it
- Use absolute URLs. Relative paths (
/services) cannot be resolved in other contexts. - Avoid marketing language. "Industry leader" carries no information. "Founded 2022, Istanbul-based, team of seven" does.
- Keep it short. 50–150 lines is ideal. Listing every page defeats the purpose; sitemap.xml already exists for that.
- List only indexable pages. Do not include noindex or login-gated pages.
- Consider one file per language. On multilingual sites
/llms.txtcan hold the primary language and/en/llms.txtthe English version. - Serve the right content type. The server should return
text/plain; charset=utf-8. - Generate it automatically. A hand-written file goes stale within three months. Generating it from your CMS is the healthiest approach.
llms.txt versus llms-full.txt
The two files do different jobs:
| llms.txt | llms-full.txt | |
|---|---|---|
| Content | Link list + descriptions | Full text of pages |
| Size | 2–10 KB | 50 KB – several MB |
| Purpose | Routing | Direct feeding |
| Who needs it | Every site | Docs, knowledge bases, blogs |
Post-deployment verification
After publishing the file, run three checks:
- Open
site.com/llms.txtin a browser — it should render as plain text, not trigger a download. - Confirm the response headers include
content-type: text/plain. - Within a few weeks you should start seeing GPTBot, PerplexityBot and ClaudeBot fetch the file in your server logs.
A realistic expectation
llms.txt is not a magic key. On its own it will not place you inside AI answers. But if your content is already good, it makes it easier for the model to understand your site correctly and lowers the risk of being summarised wrongly. That is why it is one of the highest return-on-effort GEO steps: an hour of work buying lasting clarity.
Frequently Asked Questions
What is the difference between llms.txt and robots.txt?
robots.txt is a permission file: it says which crawler may enter which directory. llms.txt is a description and routing file: it explains in Markdown what the site is and which pages are most valuable. They do not replace each other; they work together.
When is llms-full.txt needed?
llms.txt is a table of contents; llms-full.txt is the full plain-text body of the site content. It helps documentation sites, knowledge bases and content-heavy sites. Small corporate sites usually do not need it.