An llms.txt file is a Markdown file at the root of your site (/llms.txt) that gives AI models a short, curated map of your most useful pages: a title, a one-paragraph summary, and lists of links with notes. It takes about an hour to write and costs nothing to host, but it is not a ranking factor: Google says its AI features ignore it, and no major AI search provider has documented that its crawler reads it. Write one if you publish documentation or developer content that people paste into coding assistants and agents; do not expect it to move your Google traffic or your citations in ChatGPT.

The rest of this guide covers the exact format from the llms.txt proposal, a complete example, a Python script that builds the file from your XML sitemap, and an honest look at what Google and AI companies have said about it.

What llms.txt Is (and What It Is Not)

The proposal was published by Jeremy Howard of Answer.AI on September 3, 2024, and the current text on llmstxt.org is labelled version 2, updated in August 2026 "based on what I learned from two years of adoption." The problem it targets is real: context windows are limited, and a typical HTML page is mostly navigation, scripts, cookie banners and footer links. A curated Markdown index lets a model, or a person building a prompt, find the pages that matter without crawling the whole site.

It is easy to confuse llms.txt with files that do very different jobs:

File Purpose Who reads it Enforced?
robots.txt Allow or block crawlers by user agent Search engines and most AI crawlers Voluntary, but widely honored
sitemap.xml List every canonical URL with optional lastmod Search engines Hint only
llms.txt Curated, human-written Markdown index of key pages Tools and agents that choose to fetch it Nothing; purely advisory
llms-full.txt Informal convention: the full docs concatenated into one Markdown file Developers pasting docs into an LLM Not part of the llmstxt.org spec

Two points matter here. First, llms.txt does not control access. If you want to stop AI training or AI search crawlers, that is still robots.txt (see our guide to blocking AI crawlers), using the user agents each company documents. OpenAI, for example, documents GPTBot (training), OAI-SearchBot (ChatGPT search) and ChatGPT-User (user-initiated fetches). Second, llms-full.txt came from documentation platforms rather than the proposal. Mintlify says it developed that format with Anthropic, and the current llmstxt.org text does not mention it.

The llms.txt Format, Section by Section

The spec is short and strict about order. According to llmstxt.org, a file contains:

  1. An optional byte-order mark.
  2. An H1 with the project or site name. This is the only required element.
  3. A blockquote with a short summary of the project.
  4. Zero or more Markdown sections that are not headings, such as paragraphs or bullet lists, giving more detail.
  5. Zero or more H2 sections containing file lists. Each item is a Markdown list entry with a required link [name](url), optionally followed by : and a note.

There is one reserved section name. An H2 titled Optional marks secondary links that a tool can skip when it needs a shorter context.

Where the file lives

The file is named llms.txt and can live at the site root or under a subpath. A file covers the URLs under its path, so /docs/llms.txt describes /docs/, and tools should use the most specific file that applies. This is useful when a product site and its documentation are run by different teams.

Markdown versions of pages

The proposal also suggests that pages with useful content offer a Markdown version at a predictable URL, either by appending .md (/guide.html.md) or replacing the extension (/guide.md), with index.md for directory URLs. Pages can advertise both the Markdown version and the covering llms.txt with link relations, as an HTML <link> or an HTTP header. The spec's example header looks like this:

Link: </docs/page.html.md>; rel="alternate"; type="text/markdown", </docs/llms.txt>; rel="describedby"

Markdown mirrors are the expensive part, and Google's John Mueller has been openly dismissive of building separate Markdown pages for bots (Search Engine Journal, May 2026). If your docs platform generates them automatically, keep them. If it does not, start with llms.txt alone.

A Complete Example llms.txt

Here is a realistic file for a fictional API product. Notice how the notes after each link tell a model when to use the page, not just what it is called.

# Acme Queue

> Acme Queue is a hosted job queue with an HTTP API and SDKs for Python and
> TypeScript. Jobs are JSON payloads, retried with exponential backoff, and
> delivered to your workers over HTTPS webhooks or long polling.

Key facts for answering questions about Acme Queue:

- The API base URL is https://api.acmequeue.example/v2. v1 was retired.
- Authentication uses a bearer token per project, never per user.
- Maximum payload size is set per plan; see the limits page instead of guessing.

## Docs

- [Quickstart](https://acmequeue.example/docs/quickstart.md): Create a project, enqueue a job, and run a worker in Python or TypeScript.
- [Authentication](https://acmequeue.example/docs/auth.md): Token scopes, rotation, and the 401/403 error bodies.
- [Retries and backoff](https://acmequeue.example/docs/retries.md): Default retry policy, dead-letter queues, idempotency keys.
- [Webhooks](https://acmequeue.example/docs/webhooks.md): Signature verification with HMAC-SHA256 and replay protection.
- [Limits](https://acmequeue.example/docs/limits.md): Rate limits and payload limits by plan.

## API Reference

- [REST API](https://acmequeue.example/docs/api.md): Every endpoint with request and response schemas.
- [Python SDK](https://acmequeue.example/docs/sdk-python.md): Client classes, async usage, and type hints.
- [TypeScript SDK](https://acmequeue.example/docs/sdk-typescript.md): Client usage in Node.js, Bun, and edge runtimes.

## Optional

- [Changelog](https://acmequeue.example/changelog.md): Release history; only needed for version-specific questions.
- [Migration from v1](https://acmequeue.example/docs/migrate-v1.md): Breaking changes between v1 and v2.
- [Status page](https://status.acmequeue.example): Live incident information.

A few rules of thumb that come from reading a lot of these files:

  • Curate, do not dump. An llms.txt that lists every URL in your sitemap is just a worse sitemap. Pick the 10 to 50 pages someone would actually need to answer questions about your product.
  • Write the notes for a reader with no context. "Token scopes, rotation, and error bodies" is useful. "Learn more about auth" is not.
  • Put facts that are often hallucinated in the detail section. Base URLs, current major versions and naming conventions are the things models most often get wrong.
  • Keep it current. A stale file that points to retired endpoints is worse than no file.

Generate llms.txt From Your Sitemap With Python

For a content site with hundreds of pages, writing the file by hand is tedious. The script below reads your XML sitemap (including sitemap index files), fetches each page's <title> and meta description, groups URLs by their first path segment, and writes a draft llms.txt. It uses only the Python standard library and runs on Python 3.9 or later.

#!/usr/bin/env python3
"""Draft an llms.txt file from an XML sitemap (standard library only)."""
import argparse
import time
import urllib.request
import xml.etree.ElementTree as ET
from collections import defaultdict
from html.parser import HTMLParser
from urllib.parse import urlparse

NS = {"sm": "http://www.sitemaps.org/schemas/sitemap/0.9"}
UA = "llms-txt-draft/1.0"


def fetch(url, timeout=15):
    req = urllib.request.Request(url, headers={"User-Agent": UA})
    with urllib.request.urlopen(req, timeout=timeout) as resp:
        return resp.read()


def sitemap_urls(url):
    root = ET.fromstring(fetch(url))
    if root.tag.endswith("sitemapindex"):
        urls = []
        for loc in root.findall("sm:sitemap/sm:loc", NS):
            urls.extend(sitemap_urls(loc.text.strip()))
        return urls
    return [loc.text.strip() for loc in root.findall("sm:url/sm:loc", NS)]


class MetaParser(HTMLParser):
    def __init__(self):
        super().__init__()
        self.title, self.description = "", ""
        self._in_title = self._title_done = False

    def handle_starttag(self, tag, attrs):
        a = dict(attrs)
        if tag == "title" and not self._title_done:
            self._in_title = True
        elif tag == "meta" and (a.get("name") or "").lower() == "description":
            self.description = (a.get("content") or "").strip()

    def handle_endtag(self, tag):
        if tag == "title" and self._in_title:
            self._in_title, self._title_done = False, True

    def handle_data(self, data):
        if self._in_title:
            self.title += data


def page_meta(url, strip_suffix):
    parser = MetaParser()
    parser.feed(fetch(url).decode("utf-8", errors="replace"))
    title = " ".join(parser.title.split())
    if strip_suffix and title.endswith(strip_suffix):
        title = title[: -len(strip_suffix)].rstrip()
    return title or url, parser.description


def main():
    ap = argparse.ArgumentParser()
    ap.add_argument("sitemap")
    ap.add_argument("--name", required=True)
    ap.add_argument("--summary", required=True)
    ap.add_argument("--section", action="append", default=[],
                    help="path-prefix=Heading, e.g. docs=Docs (repeatable)")
    ap.add_argument("--max-per-section", type=int, default=25)
    ap.add_argument("--strip-suffix", default="")
    ap.add_argument("--delay", type=float, default=0.5)
    ap.add_argument("--out", default="llms.txt")
    args = ap.parse_args()

    sections = dict(s.split("=", 1) for s in args.section)
    grouped = defaultdict(list)
    for url in sitemap_urls(args.sitemap):
        first = urlparse(url).path.strip("/").split("/")[0]
        heading = sections.get(first)
        if heading and len(grouped[heading]) < args.max_per_section:
            grouped[heading].append(url)

    lines = [f"# {args.name}", "", f"> {args.summary}", ""]
    for heading in sections.values():
        if not grouped[heading]:
            continue
        lines += [f"## {heading}", ""]
        for url in grouped[heading]:
            try:
                title, desc = page_meta(url, args.strip_suffix)
            except Exception as exc:  # keep going on one bad page
                print(f"skip {url}: {exc}")
                continue
            lines.append(f"- [{title}]({url})" + (f": {desc}" if desc else ""))
            time.sleep(args.delay)
        lines.append("")

    with open(args.out, "w", encoding="utf-8") as fh:
        fh.write("\n".join(lines))
    print(f"wrote {args.out}")


if __name__ == "__main__":
    main()

Run it with the sections you care about, in the order you want them to appear:

python3 make_llms_txt.py https://example.com/sitemap.xml \
  --name "Example Dev Tools" \
  --summary "Free browser-based developer and SEO utilities plus tutorials." \
  --section tools=Tools --section blogs=Guides \
  --strip-suffix " | Example" --max-per-section 30

Treat the output as a draft. Meta descriptions are written to win clicks, not to brief a model, so edit the notes by hand, move low-value sections under ## Optional, and add the key-facts paragraph yourself. The --delay flag keeps the script from hammering your own server; leave it on.

Serving the file

The spec calls the file Markdown but does not mandate a content type. Serving it as UTF-8 plain text works with every client. Google's John Mueller said in July 2025 that using noindex on it "could make sense," since a linked llms.txt can otherwise end up in search results and confuse users. An nginx block that does both:

location = /llms.txt {
    default_type text/plain;
    charset utf-8;
    add_header X-Robots-Tag "noindex" always;
}

If you are on WordPress, you may not need any of this. The llmstxt.org page lists Yoast SEO and AIOSEO among the platforms that generate llms.txt automatically, alongside Mintlify, GitBook and Wix.

Does llms.txt Actually Help? What Google and AI Companies Have Said

This is where most articles overpromise. Here is what is on the record.

Google Search: no effect

Google's own documentation is unambiguous. Its guide Optimizing your website for generative AI features on Google Search says you do not need to create new machine-readable files, AI text files, markup or Markdown to appear in Google Search, and that Search ignores them. The same page says creating such files is fine for other services. To be eligible for AI Overviews or AI Mode, a page must be indexed and eligible to be shown with a snippet, which is ordinary SEO.

Individual Googlers have said the same thing for over a year. John Mueller wrote on Bluesky in June 2025, "FWIW no AI system currently uses llms.txt." Gary Illyes said at a Search Central Live event that Google would not be crawling or using the files (Search Engine Land).

A mixed signal from Chrome

Lighthouse is a different team with a different goal. According to Search Engine Journal, Lighthouse 13.3 added an llms.txt audit inside an experimental "Agentic Browsing" category, aimed at browser-based agents rather than search ranking. A passing audit there tells you the file exists and is served correctly. It does not tell you anyone is ranking you higher for it.

AI search engines: nothing documented

OpenAI's crawler documentation explains how to control GPTBot, OAI-SearchBot and ChatGPT-User with robots.txt and says nothing about reading llms.txt for discovery. Perplexity's bot page covers PerplexityBot and Perplexity-User the same way, and Anthropic's help center article on its crawlers describes ClaudeBot, Claude-User and Claude-SearchBot purely in terms of robots.txt. Interestingly, both the OpenAI and Perplexity docs sites publish an llms.txt index of their own documentation, linked from those same bot pages. That is the honest summary of where the format is useful today: developer documentation that humans and coding agents fetch on purpose.

Where it does earn its keep

  • Coding assistants and agents. When a developer tells an agent "read the docs at example.com/llms.txt," a clean index saves a lot of tokens and wrong guesses. Several MCP servers and IDE extensions exist specifically to fetch these files.
  • Copy-paste workflows. A curated index or a full Markdown export is the fastest way for a user to load your docs into a chat window.
  • Internal clarity. Writing the file forces you to decide which 30 pages matter. That exercise often exposes outdated docs and orphaned pages.

What I could not find is any controlled, public study showing that adding llms.txt increased citations in ChatGPT, Perplexity, Claude or Google's AI features. Vendor dashboards that report "AI visibility" changes after adding the file usually cannot separate it from everything else that changed. If you want to measure AI visibility properly, track prompts and citations over time with a tool built for it; our roundup of AI visibility tracking tools covers the options.

What to Do Instead (or As Well)

If your goal is to appear in AI answers, the levers are the same ones that drive search:

  1. Get indexed. Google's AI features only draw from indexed, snippet-eligible pages. Fix indexing problems before anything else.
  2. Allow the crawlers you want. Check robots.txt for accidental blocks on OAI-SearchBot, Claude-SearchBot or PerplexityBot if you want to appear in those products.
  3. Write pages that answer specific questions well. Clear headings, direct answers near the top, and original information are what get quoted. Our guide to AI search optimization (GEO and AEO) goes deeper.
  4. Earn mentions elsewhere. AI answers lean on sources that other sites already cite.

For Google specifically, see how AI Overviews select sources. And if you need a correct robots.txt or sitemap to go with your llms.txt, the generators in our free SEO tools will produce both.

Frequently Asked Questions

Is llms.txt a ranking factor for Google?

No. Google's documentation on generative AI features says Search ignores AI text files like llms.txt, and that appearing in AI Overviews and AI Mode requires a page to be indexed and snippet-eligible. Adding the file will not change your Google rankings either way.

Does ChatGPT or Perplexity read llms.txt?

Neither OpenAI nor Perplexity documents using llms.txt for crawling or ranking; their crawler docs are about robots.txt user agents. A user can still point ChatGPT or an agent at your llms.txt manually, and it will read it like any other URL.

What is the difference between llms.txt and llms-full.txt?

llms.txt is a short index of links with notes, defined by the llmstxt.org proposal. llms-full.txt is an informal convention, popularised by documentation platforms such as Mintlify, that concatenates the full text of your docs into one Markdown file. It is not part of the llmstxt.org spec.

Should I block AI crawlers in llms.txt?

You cannot. llms.txt has no directives for allowing or blocking anything. Use robots.txt with the documented user agents, such as GPTBot for OpenAI training or ClaudeBot for Anthropic training, to control access.

Can llms.txt hurt my SEO?

Not directly, since Google ignores it for ranking. The realistic risks are the file itself getting indexed (which noindex via an X-Robots-Tag header prevents) and a stale file sending agents to outdated pages.

Do I need Markdown versions of every page?

No. The proposal recommends them, but they are optional. Start with a hand-curated llms.txt. Add .md mirrors only if your documentation platform generates them automatically or you see real agent traffic requesting them.

Conclusion

llms.txt is a small, sensible convention for one job: giving models and agents a clean map of your most important pages. Write one if you publish docs, APIs or tutorials that developers feed into AI tools; it takes an hour with the script above. Do not buy the pitch that it is an "AI SEO" lever. Google has said in writing that Search ignores it, and no AI search provider has said it uses the file to pick sources. Spend most of your effort on indexing, crawler access and content worth citing, and treat llms.txt as a tidy extra.