llms.txt v2 Specification: Complete Overview & Implementation Guide
What is llms.txt v2?
Following two years of widespread adoption across thousands of documentation platforms and websites, the llms.txt v2 specification proposal refines how Large Language Models and autonomous AI agents discover and traverse structured web data.
While v1 introduced the concept of placing a static Markdown file at /llms.txt, v2 addresses real-world challenges around blind probing, multi-page discovery, and context-window efficiency.
The 4 Core Pillars of llms.txt v2
1. Standard HTML Discovery Tags
Instead of forcing AI crawlers to blindly guess whether a site hosts an llms.txt file, v2 enables web pages to explicitly declare their AI roadmap in the HTML <head>:
<!-- Declares the site roadmap for AI agents -->
<link rel="describedby" href="/llms.txt" />
<!-- Declares the full-context documentation file -->
<link rel="alternate" type="text/markdown" href="/llms-full.txt" title="Full Context" />2. Page-Level Markdown Alternates (rel="alternate")
Modern web pages contain heavy client-side JavaScript, ads, and layout boilerplate. With v2, every HTML page can point AI models directly to its clean Markdown twin:
<link rel="alternate" type="text/markdown" href="/docs/getting-started.md" />When Claude Code, Cursor, or Perplexity browses the URL, it fetches the lightweight Markdown version directly, saving over 80% in token overhead.
3. Path-Scoped Scoping (/docs/llms.txt, /api/llms.txt)
For large corporate platforms or multi-product suites, v2 supports modular, directory-specific files:
https://example.com/llms.txthttps://example.com/docs/llms.txthttps://example.com/api/llms.txtAI models automatically select the most specific file matching the subpath they are exploring.
4. HTTP Link Headers for Headless & API Responses
Servers can emit standard RFC-compliant HTTP headers on every response:
Link: </llms.txt>; rel="describedby", </llms-full.txt>; rel="alternate"; type="text/markdown"How to Implement llms.txt v2 on Your Website
/llms.txt and /llms-full.txt are live with standard Markdown formatting.<link rel="describedby" href="/llms.txt" /> inside your site's global HTML <head>.Want to check your own website's AI readiness?
Scan your domain in seconds to verify compliance with llms.txt, robots.txt, and agent.json protocols.