# How to create an llms.txt file: step-by-step guide

> How to create llms.txt by the second edition of the proposal: pick the main pages, write the file, place it at the site root, check the server response, keep it current

Page: https://llms-full-txt.ru/en/guides/getting-started/
Site index: https://llms-full-txt.ru/en/llms.txt

To create `llms.txt`, pick the main pages of the site, write them down as a list of links with notes, and put the file at the site root.

By hand it takes half an hour. For a site on a content management system, an extension usually assembles the file.

The hard part is not the format but the selection: the file is useful when it holds what matters, not everything.

If you have not decided whether you need the file at all: [What is llms.txt](https://llms-full-txt.ru/en/guides/what-is-llms-txt/).

## The manual path

1. **Pick the main pages.**

   Picture a person who arrives at the site for the first time with a question. Which five to twenty pages answer most questions? That is the content of the file.

   Leave out: login and cart pages, search results, service and private sections, duplicates.

2. **Group them by meaning.**

   Two to five sections are enough for almost any site: documentation and examples, catalog and terms, articles and help.

3. **Write the file.**

   The site name, one or two sentences about it, then sections with links. Each link gets a note saying what is behind it.

4. **Put the file at the site root.**

   It has to open at `https://your-site/llms.txt` and be served as text.

5. **Check the server response.**

   Status `200`, a text content type, the first line starts with a hash sign. A common mistake: the site serves an HTML page instead of the file.

6. **Decide how the file will be refreshed.**

   A file that does not change together with the site points to missing pages half a year later.

## What the file looks like

- llms.txt
- The file of a small documentation site
- Name

```
# Kolos API
```

- A first-level heading. The only required part
- Summary

```
> A delivery service for online stores: rate calculation, order creation, tracking.
```

- What the site is, in one or two sentences
- Details

```
Every request needs a key. Test environment: sandbox.kolos.example
```

- Optional text without headings: what is worth knowing in advance
- Section

```
## Documentation
- [Quick start](https://kolos.example/docs/start.md): the key, the first request, the first order
- [API reference](https://kolos.example/docs/api.md): methods, parameters, error codes
```

- A second-level heading and a list of links with notes
- Secondary

```
## Optional
- [Changelog](https://kolos.example/changelog.md): versions and dates
```

- By convention, what can be skipped goes here

The same file as a whole:

```markdown
# Kolos API

> A delivery service for online stores: rate calculation, order creation, tracking.

Every request needs a key. Test environment: sandbox.kolos.example

## Documentation

- [Quick start](https://kolos.example/docs/start.md): the key, the first request, the first order
- [API reference](https://kolos.example/docs/api.md): methods, parameters, error codes

## Optional

- [Changelog](https://kolos.example/changelog.md): versions and dates
```

Exact rules: [the file format](https://llms-full-txt.ru/en/specification/format/), [sections](https://llms-full-txt.ru/en/specification/sections/). More samples: [basic examples](https://llms-full-txt.ru/en/examples/basic/).

## Where to put it

The file goes to the site root, next to `robots.txt`. For a static site that is the folder with public files. For a site on a content management system an extension usually serves the file, and it does not exist on disk.

The [second edition of the proposal](https://llmstxt.org/) also allows a file in a section of the site. It then describes only the addresses inside that section:

```text
/llms.txt        the whole site
/docs/llms.txt   the /docs/ section only
```

## Checking

```bash
curl -sI https://example.com/llms.txt
curl -s https://example.com/llms.txt | head -n 3
```

1. The status code is `200`.
2. The content type is `text/plain` or `text/markdown`.
3. The first line starts with `# `.
4. Links are absolute and open.
5. `robots.txt` does not block the file.

The full list of checks: [Validating files and markup](https://llms-full-txt.ru/en/guides/validation/).

## Helping an agent find the file

The second edition added a relation through which a page says which `llms.txt` describes it:

```html
<link rel="describedby" href="/llms.txt">
```

This step is optional. More: [Discovery of the file and Markdown versions](https://llms-full-txt.ru/en/specification/discovery/).

## The ready-made path

When the site runs on a content management system, there is no reason to write the file by hand: an extension assembles it from existing pages.

| The site runs on | What to read |
|---|---|
| WordPress | [llms.txt in WordPress](https://llms-full-txt.ru/en/guides/wordpress/) |
| Webasyst, Shop-Script | [llms.txt and JSON-LD in Webasyst](https://llms-full-txt.ru/en/guides/webasyst/), ready-made extensions |
| Starlight, Docusaurus, MkDocs, VitePress | [Setup in documentation generators](https://llms-full-txt.ru/en/reference/configuration/) |
| Something else | [Generators and tools](https://llms-full-txt.ru/en/tools/generators/) |

An automatically assembled file is checked the same way as one written by hand. It is also worth reading through: an extension knows the structure of the site but not what matters on it.

## What not to do

- **Do not copy the sitemap.** The full list of addresses is already in `sitemap.xml`. This file needs selection.
- **Do not write prohibitions.** The file blocks nothing. Robot access is configured in `robots.txt`.
- **Do not add private things.** The file is public: no admin addresses, no drafts.
- **Do not expect better rankings.** Search engines do not use the file for ranking: [Does llms.txt work](https://llms-full-txt.ru/en/guides/does-llms-txt-work/).

## What next

- [Best practices](https://llms-full-txt.ru/en/guides/best-practices/) - how to make the file useful
- [An AI-ready site](https://llms-full-txt.ru/en/guides/ai-ready-site/) - the other layers: access, markup, content
- [What is llms-full.txt](https://llms-full-txt.ru/en/guides/llms-full-txt/) - whether a second file is needed
- [A prompt for generation](https://llms-full-txt.ru/en/prompts/generate-llms-txt/) - a draft of the file with the help of an AI system
