How to Create an llms.txt File for Your Website (2026 Guide + Template)
What llms.txt is, why it helps AI assistants use your content, and how to create one — with a ready-to-fill template you can copy and adapt.
AI assistants now answer questions using content pulled straight from websites — but they have to fight through nav bars, cookie banners, and JavaScript to find the parts that matter. An llms.txt file fixes that: it hands large language models a clean, curated map of your site, so they surface your content accurately instead of guessing.
This guide explains what llms.txt is, why it's worth adding, how the format works, and gives you a ready-to-fill template.
What is llms.txt?
llms.txt is a plain Markdown file you publish at the root of your domain — https://yoursite.com/llms.txt — that gives LLMs a concise, human-written table of contents for your most important pages. Each entry is a link with a short description, so an assistant can jump to exactly the right page without crawling your entire site.
The idea was proposed at llmstxt.org and is being adopted by docs sites and SaaS products. It sits alongside two files you already know:
| File | Audience | Purpose |
|---|---|---|
robots.txt | Crawlers | What they may or may not crawl |
sitemap.xml | Search engines | Every URL on the site |
llms.txt | LLMs / AI assistants | A curated, described shortlist of what matters |
Think of sitemap.xml as the full index and llms.txt as the hand-picked "start here" guide.
Why add one?
- AI answers already use your content. ChatGPT, Claude, Perplexity and others cite and summarize web pages.
llms.txthelps them find the right ones and describe them the way you'd want. - You control the narrative. You choose which pages to surface and how each is summarized.
- It's token-efficient. A short, clean file is cheaper and faster for a model to read than a rendered HTML page full of markup.
- It complements what you have.
robots.txtsets crawl rules,sitemap.xmllists everything —llms.txtis the curated layer on top.
The format
llms.txt is just Markdown with a specific shape:
- An H1 with your site or project name — the only required line.
- An optional blockquote (
>) with a one-line summary. - Optional paragraphs of context (no headings) an LLM should read first.
- Zero or more H2 sections, each containing a Markdown list of links in the form
- [Title](url): description. - A special
## Optionalsection — links here are "nice to have" and can be dropped when a shorter context is needed.
Two common extras: many sites publish a clean .md version of each key page (Markdown, no chrome) and link to those; some also publish llms-full.txt, every page's content concatenated into one file for tools that want it all at once.
Create yours in 4 steps
- List your most valuable pages — docs, key guides, pricing, API reference. Curate; don't dump your whole sitemap.
- Write a one-line description for each, specific and human ("Full endpoint and parameter reference", not "API").
- Group them under H2 headings like
## Docs,## Guides, and move less-critical links to## Optional. - Save it as
llms.txtand serve it from your web root.
The template
Copy this, replace the placeholders, and delete any sections you don't need:
# Your Company
> One sentence on what your product does and who it's for.
Optional short paragraph with any context an LLM should know before reading the
linked pages — positioning, scope, or important caveats. No headings here.
## Docs
- [Getting started](https://example.com/docs/start.md): Set up and run your first task
- [API reference](https://example.com/docs/api.md): Full endpoint and parameter reference
- [Pricing](https://example.com/pricing): Plans and what each includes
## Guides
- [How it works](https://example.com/blog/how-it-works.md): Deep dive into the core concept
- [Best practices](https://example.com/guides/best-practices.md): Recommended patterns and gotchas
## Optional
- [Changelog](https://example.com/changelog): Release history (safe to skip for shorter context)
- [About](https://example.com/about): Company backgroundThe ## Optional heading is meaningful, not decorative — assistants working with a tight context window are meant to drop those links first.
Where to put it & how to check
- Serve it at
https://yoursite.com/llms.txtastext/plainortext/markdown. - Static sites / Next.js: drop
llms.txtin yourpublic/folder (or add a small route that returns the Markdown). - Verify: open
https://yoursite.com/llms.txtin a browser — you should see your raw Markdown, not a 404 or your homepage.
Best practices
- Curate, don't exhaust — that's what
sitemap.xmlis for. - Descriptions matter — one specific line per link does more than a clever title.
- Link to clean
.mdpages when you can, so the model reads content, not markup. - Keep it current as your best content changes.
- Don't leak private, paywalled, or staging URLs.
How WebScore helps
WebScore checks whether your site publishes an llms.txt as part of its audit, and the WebScore MCP server exposes a get_llms_txt tool so your AI can fetch and read any site's llms.txt on demand. Scan your site free to see where you stand.
Related Articles
Scan Your Website Now
Get a comprehensive analysis of your website's performance, SEO, security, and more.