Назад в Learn
Москва
Инструкции

How to Write llms.txt Correctly: Template & Examples

A correct llms.txt file tells AI language models which pages matter, what your site does, and how to prioritize content. This guide gives you a copy-paste template plus annotated examples.

Автор: Daniel Mercer4 мин чтения
How to Write llms.txt Correctly: Template & Examples

A well-formed llms.txt file gives AI search engines and LLM crawlers an explicit, structured summary of your site — what it is, which pages matter most, and what to skip. Get it right and your content is more likely to be cited accurately in AI-generated answers.

What Is llms.txt and Why Does It Matter?#

llms.txt is a plain-text Markdown file placed at your site root (https://yourdomain.com/llms.txt). It follows a community-proposed specification that structures site metadata in a way large language models can parse reliably — unlike HTML, which forces models to strip boilerplate before reaching real content.

Unlike robots.txt (which gates crawl access) or sitemap.xml (which lists URLs), llms.txt communicates meaning: what your site does, who it serves, and which documents carry the most authoritative information.

What Are the Required Sections of llms.txt?#

The spec defines three structural layers:

  1. H1 title — your site or product name, on the very first line.
  2. Blockquote summary — one to three sentences describing your site's purpose.
  3. H2 sections with file links — grouped lists of Markdown links pointing to important pages, each with an optional inline description.

Optional but recommended: an ## Optional section for secondary or supplementary content that LLMs may deprioritize.

Full llms.txt Template (Copy-Paste Ready)#

Below is a minimal-valid template you can adapt directly:

# YourSiteName

> One to three sentences that describe what your site or product does,
> who it is for, and what kind of content or data it contains.

## Docs

- [Getting Started](/docs/getting-started.md): How to set up and use the product.
- [API Reference](/docs/api-reference.md): Complete endpoint documentation.
- [Authentication](/docs/auth.md): Token types, OAuth flow, and expiry rules.

## Blog

- [How LLMs Index the Web](/blog/how-llms-index-the-web.md): Explains crawler behavior for AI models.
- [SEO for AI Search](/blog/seo-for-ai-search.md): Tactical guide for AEO practitioners.

## Optional

- [Changelog](/changelog.md): Version history and release notes.
- [Press Kit](/press.md): Logos, brand guidelines, and contact info.

Save the file as UTF-8, no BOM. Keep line endings as LF (Unix-style).

How Do You Write the Blockquote Summary Correctly?#

The blockquote is the single most important field for AI citation accuracy. Write it as one to three sentences that answer: What does this site do? Who is it for? What makes it authoritative?

  • Do: > SeoChatAI audits websites for AI-search readiness, technical SEO, security, and accessibility — built for marketers, developers, and agencies.
  • Don't: > Welcome to our website. We have lots of great content.

Avoid marketing superlatives. LLMs weight specificity over enthusiasm.

Each link in a section should point to the Markdown version of a page when possible, not the rendered HTML URL. The spec strongly prefers .md files because LLMs parse plain Markdown far more efficiently than HTML.

If you don't serve .md files publicly, link to the canonical HTML page — it still works, but you lose some parsing efficiency.

Every link line follows this pattern:

- [Descriptive Title](/path/to/page.md): One sentence explaining the page's scope.

The inline description after the colon is optional but materially improves how well a model understands the page before deciding whether to fetch it.

What Are Common llms.txt Mistakes to Avoid?#

  • Missing H1 on line 1. The spec requires the site name as an H1 (#) on the very first line — no blank line above it.
  • Using HTML instead of Markdown links. <a href="..."> tags are not valid in this context.
  • Linking to low-value pages. Index pages, tag archives, and boilerplate legal pages dilute signal. Be selective.
  • Omitting descriptions. A bare link list with no inline context forces the model to guess — descriptions cost you nothing and improve accuracy.
  • Wrong MIME type on the server. Serve llms.txt as text/plain; charset=utf-8. Some servers default to application/octet-stream, which breaks parsers.

Real-World Example: SaaS Product Site#

# Acme Analytics

> Acme Analytics is a real-time web analytics platform for e-commerce teams.
> It tracks conversion funnels, session replays, and revenue attribution
> without requiring cookies or client-side JavaScript.

## Docs

- [Quick Start](/docs/quick-start.md): Install the tracking pixel and verify data flow in under 10 minutes.
- [Revenue Attribution Model](/docs/attribution.md): How Acme assigns credit across multi-touch journeys.
- [Privacy & Compliance](/docs/privacy.md): GDPR, CCPA, and data residency options.

## Blog

- [Cookieless Tracking Explained](/blog/cookieless-tracking.md): Technical deep-dive into server-side event collection.
- [E-commerce Funnel Benchmarks 2024](/blog/funnel-benchmarks.md): Conversion rate data across 12 verticals.

## Optional

- [Roadmap](/roadmap.md): Upcoming features and release timelines.

How Do You Validate Your llms.txt File?#

Manual checks cover the basics: confirm the file is reachable at /llms.txt, that it returns HTTP 200, and that the MIME type is text/plain. Then read through the file and verify every link resolves to a live page.

For automated validation, use the llms.txt generator and auditor at SeoChatAI — it checks structure, link validity, MIME type, and section ordering in one pass.

Should You Also Create llms-full.txt?#

The spec allows an optional companion file, llms-full.txt, that contains the complete Markdown content of your most important pages concatenated together. This gives models the full text without requiring multiple fetches.

Create llms-full.txt if your primary audience is developers or technical researchers who may query AI assistants about your documentation in depth. For most marketing sites, a well-structured llms.txt is sufficient.

How Often Should You Update llms.txt?#

Update it whenever you publish a major new page, retire a section, or change your site's primary use case. Treat it like a curated index, not a generated sitemap — quality over completeness.

A stale llms.txt pointing to 404 pages actively harms how AI models perceive your site's reliability. Build an update into your content publication checklist.

If you're starting from scratch or auditing an existing file, the llms.txt generator can scaffold a valid file from your sitemap and flag broken links before they reach a crawler.

How to Write llms.txt Correctly: Template & Examples — illustration 1

Попробуйте наш бесплатный llms.txt generator

Читать статью
Поделиться статьёйXLinkedIn

Часто задаваемые вопросы

Where do I put the llms.txt file on my website?
Place it at your domain root so it's accessible at `https://yourdomain.com/llms.txt`. It must return HTTP 200 with a `text/plain; charset=utf-8` content type. Subdirectory placement is not recognized by current parsers.
Does llms.txt replace robots.txt or sitemap.xml?
No. Each file serves a distinct purpose. `robots.txt` controls crawl access, `sitemap.xml` lists URLs for indexing, and `llms.txt` communicates semantic meaning and content priority to LLMs. All three can and should coexist.
Do links in llms.txt have to point to .md files?
The spec prefers Markdown URLs because LLMs parse plain Markdown more efficiently than HTML. If you don't serve `.md` files publicly, linking to canonical HTML URLs is acceptable — you just lose some parsing efficiency compared to raw Markdown.
What should I write in the blockquote summary?
Write one to three sentences that describe what your site does, who it serves, and what makes its content authoritative. Be specific — avoid vague marketing language. LLMs weight concrete, factual descriptions when deciding how to cite your content.
How many pages should I list in llms.txt?
There is no hard limit, but quality beats quantity. List your most authoritative, evergreen pages — documentation, core guides, and key reference content. Avoid tag archives, paginated indexes, and low-value pages that dilute the signal for AI crawlers.
Will llms.txt affect my Google rankings?
Not directly. Google's traditional web crawler does not use `llms.txt` as a ranking signal. Its impact is on AI-powered answer engines and LLM-based search interfaces that cite sources. Think of it as AEO infrastructure rather than traditional SEO.
How do I check if my llms.txt is valid?
Manually verify the file returns HTTP 200 at `/llms.txt` with MIME type `text/plain`, then confirm all linked pages resolve. For automated checks — structure, link validity, section order, and MIME type — use a dedicated validator tool like the SeoChatAI llms.txt generator.