Documentation
Documentation for machine-readable site files
How to write and serve llms.txt, robots.txt, XML sitemaps and schema.org structured data, explained from the specifications, with examples you can copy and real files from documentation sites.
# For any crawler without its own group
User-agent: *
Disallow: /drafts/
Sitemap: https://example.com/sitemap.xmlStart here
New to the documentation? Read these pages first, in this order.
- Machine-readable files a website can publishThe files and markup a site publishes for crawlers, search engines, language model tools and security researchers: what each one is for, where it lives and which document defines it.
- Where site files live: the root path and /.well-known/Clients find machine-readable site files at fixed addresses: some at the root of each host, some under the /.well-known/ prefix of RFC 8615, and some inside every page. Where a file sits also decides which URLs it can speak for.
- llms.txt file formatThe structure of an llms.txt file as defined by version 2.1 of the proposal: a required H1 title, an optional summary, Base URL line and details, then H2 sections of annotated links.
- robots.txt syntax: groups, rules and matchingReference for the robots.txt file format as standardized in RFC 9309: groups and user-agent lines, allow and disallow rules, the * and $ characters, comments, and the longest-match rule that decides which line applies to a URL.
- Sitemap XML formatEvery element of the Sitemaps 0.9 XML format, with the size limits, encoding and escaping rules, which fields Google uses, and the RSS, Atom and text alternatives.
Browse the documentation
Getting started
3 pagesWhat machine-readable site files are, where they live on a server, and how to serve them with the right media type, encoding and status codes.
All pages in Getting started- Machine-readable files a website can publish
The files and markup a site publishes for crawlers, search engines, language model tools and security researchers: what each one is for, where it lives and which document defines it.
Beginner - Where site files live: the root path and /.well-known/
Clients find machine-readable site files at fixed addresses: some at the root of each host, some under the /.well-known/ prefix of RFC 8615, and some inside every page. Where a file sits also decides which URLs it can speak for.
Beginner - Serving site files: media types, encoding and status codes
Which Content-Type each machine-readable file should be served with, why UTF-8 matters, and how crawlers react to redirects, client errors and server errors when they request robots.txt.
Intermediate
llms.txt
4 pagesThe llms.txt proposal: the Markdown file format, Markdown versions of individual pages, and annotated llms.txt files published by real documentation sites.
All pages in llms.txt- What llms.txt is
llms.txt is a proposed Markdown file, usually served at /llms.txt, that gives language model tools a short description of a site and a curated list of links to read. It is a proposal rather than a standard, and it does not control crawling or training.
Beginner - llms.txt file format
The structure of an llms.txt file as defined by version 2.1 of the proposal: a required H1 title, an optional summary, Base URL line and details, then H2 sections of annotated links.
Reference - Markdown versions of pages and llms-full.txt
The llms.txt proposal asks sites to offer a clean Markdown copy of useful pages at the page's own URL with .md added, and to announce it with standard link relations. llms-full.txt, a single file holding a whole site, is a platform convention outside the proposal.
Intermediate - llms.txt files from documentation sites
Seven llms.txt files published by the proposal's author and by documentation teams at Anthropic, OpenAI, Google, Cloudflare and Stripe, retrieved on 5 December 2026 and compared section by section.
Reference
robots.txt
5 pagesThe Robots Exclusion Protocol as standardized in RFC 9309, the robots.txt tokens of AI crawlers, page-level robots directives and the newer usage preference signals.
All pages in robots.txt- robots.txt syntax: groups, rules and matching
Reference for the robots.txt file format as standardized in RFC 9309: groups and user-agent lines, allow and disallow rules, the * and $ characters, comments, and the longest-match rule that decides which line applies to a URL.
Reference - AI crawler tokens for robots.txt
The robots.txt product tokens that OpenAI, Anthropic, Google, Apple, Perplexity, Common Crawl and Meta document for their crawlers and fetchers, what each operator says the token is for, and what it says about obeying robots.txt.
Reference - Page-level rules: the robots meta tag and X-Robots-Tag
robots.txt decides whether a URL is fetched; the robots meta tag and the X-Robots-Tag header decide what a search engine may do with a page or file once it has been fetched, such as leaving it out of the index or showing no snippet.
Reference - What robots.txt does not do
robots.txt asks crawlers not to fetch URLs. It does not protect content, hide paths, keep URLs out of search results or, for Google, carry noindex and crawl-delay rules. What to use for each of those instead.
Intermediate - Usage preferences beyond allow and disallow
Allow and disallow say whether a URL may be fetched. A newer set of signals says how fetched content may be used, for search, as input to AI answers or for training: operator tokens such as Google-Extended, Cloudflare's Content-Signal line, and the IETF AI Preferences drafts.
Intermediate
Sitemaps
4 pagesThe Sitemaps 0.9 XML protocol, sitemap index files, language alternates in sitemaps and the ways crawlers find a sitemap.
All pages in Sitemaps- Sitemap XML format
Every element of the Sitemaps 0.9 XML format, with the size limits, encoding and escaping rules, which fields Google uses, and the RSS, Atom and text alternatives.
Reference - Sitemap index files
A sitemap index is an XML file that lists other sitemaps instead of pages. It is required once a site passes 50,000 URLs or 50 MB in one sitemap, and it is useful well before that for splitting a site by section.
Reference - How crawlers find a sitemap
A sitemap only helps once a crawler knows where it is. The Sitemap line in robots.txt, submission in Google Search Console and Bing Webmaster Tools, the retired ping endpoint, and IndexNow for announcing changed URLs.
Intermediate - Language alternates in sitemaps
A sitemap can tell search engines that pages are translations or regional versions of each other, using xhtml:link elements with hreflang values inside each url entry. Every version lists every version, itself included.
Intermediate
Structured data
3 pagesSchema.org vocabulary written as JSON-LD: the core syntax, the types that suit documentation pages, and the tools that validate markup.
All pages in Structured data- JSON-LD basics: @context, @type and @id
How schema.org structured data is written in JSON-LD 1.1: the script element that carries it, the four keywords most pages need, and the choice between nesting a node and referring to it by @id.
Beginner - Schema.org types for documentation sites
Which schema.org types describe a documentation page and the site around it: TechArticle for the page, BreadcrumbList for its place in the hierarchy, WebSite and Organization for the site and its owner, and SoftwareSourceCode for code examples, with a complete JSON-LD block.
Intermediate - Validating structured data
The Schema Markup Validator checks markup against schema.org; Google's Rich Results Test checks only the features Google Search supports. How to use both, what Search Console adds, and why valid markup can still be ignored.
Intermediate
Formats and HTTP
3 pagesJSON as a publishing format, security.txt, and the canonical and alternate links that tie a page to its other versions.
All pages in Formats and HTTP- Publishing JSON files: media type, encoding and parsing
The rules a published JSON file has to follow under RFC 8259, how to serve it over HTTP, and how to write, read, format and validate it with Python's json module without producing output that other parsers reject.
Intermediate - security.txt: publishing a security contact
The security.txt format defined in RFC 9116: where the file must be served, the two required fields Contact and Expires, the optional fields, signing, and the scope of a single file.
Reference - Canonical and alternate links
A canonical link names the preferred URL when the same content is reachable at several addresses; alternate links point to translations and to the same page in other formats, such as JSON or Markdown. Both can be written in the HTML head or sent as HTTP Link headers.
Intermediate