Skip to content
WebScore LogoWebScorev2
seo8 min read

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.

July 4, 2026
llms.txtllms.txt filellms.txt templateAI SEOanswer engine optimizationllmstxtAI discoverabilitygenerative engine optimization

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:

FileAudiencePurpose
robots.txtCrawlersWhat they may or may not crawl
sitemap.xmlSearch enginesEvery URL on the site
llms.txtLLMs / AI assistantsA 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.txt helps 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.txt sets crawl rules, sitemap.xml lists everything — llms.txt is the curated layer on top.

The format

llms.txt is just Markdown with a specific shape:

  1. An H1 with your site or project name — the only required line.
  2. An optional blockquote (>) with a one-line summary.
  3. Optional paragraphs of context (no headings) an LLM should read first.
  4. Zero or more H2 sections, each containing a Markdown list of links in the form - [Title](url): description.
  5. A special ## Optional section — 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

  1. List your most valuable pages — docs, key guides, pricing, API reference. Curate; don't dump your whole sitemap.
  2. Write a one-line description for each, specific and human ("Full endpoint and parameter reference", not "API").
  3. Group them under H2 headings like ## Docs, ## Guides, and move less-critical links to ## Optional.
  4. Save it as llms.txt and 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 background

The ## 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.txt as text/plain or text/markdown.
  • Static sites / Next.js: drop llms.txt in your public/ folder (or add a small route that returns the Markdown).
  • Verify: open https://yoursite.com/llms.txt in a browser — you should see your raw Markdown, not a 404 or your homepage.

Best practices

  • Curate, don't exhaust — that's what sitemap.xml is for.
  • Descriptions matter — one specific line per link does more than a clever title.
  • Link to clean .md pages 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.

About WebScore

WebScoreis a free website audit platform that grades any site across five dimensions — performance, SEO, accessibility, security and UI/UX — in about 60 seconds. Run a WebScore scan to see exactly what's holding your pages back and get a prioritized list of fixes, with detailed WebScore reports starting at $3 or lifetime access for a one-time $29.99.

Whether you're comparing WebScore to other audit tools, checking a single page or monitoring an entire portfolio, WebScore turns a raw website score into clear, actionable steps. Get your free WebScore for any URL today.