What is an LLMS.txt File?
An llms.txt file is a structured text document specifically designed for consumption by Large Language Models (LLMs) like ChatGPT, Claude, Gemini, and other AI systems. Similar to how robots.txt guides search engine crawlers, llms.txt provides AI systems with a clear, organized summary of your website's content, structure, and most important pages.
This emerging standard represents a fundamental shift in how websites communicate with artificial intelligence. As AI systems increasingly browse and interpret web content to answer user questions, having a properly formatted llms.txt file ensures your site is accurately represented in AI-generated responses.
Official Proposal by Jeremy Howard (September 3, 2024):
"We propose that those interested in providing LLM-friendly content add a /llms.txt file to their site. This is a markdown file that provides brief background information and guidance, along with links to markdown files providing more detailed information."
The proposal addresses a critical problem: "Today, constructing the right context for LLMs based on a website is ambiguous — do you crawl the sitemap and include every page, trying to automatically format into an LLM-friendly form? Selectively include external links in addition to the sitemap? For specific domains like software documentation should you also try to include all the source code? Site authors know best, and can provide a list of content that an LLM should use."
Why LLMS.txt Files Are Critical for Modern Websites
The AI Revolution in Content Discovery
Traditional SEO focused exclusively on search engines like Google, Bing, and Yahoo. Today, millions of users ask questions to AI assistants that browse the web and synthesize information from multiple sources. Without an llms.txt file, AI systems must:
- Crawl your entire site structure manually
- Guess which pages are most important
- Interpret navigation and content hierarchy without guidance
- Potentially miss critical pages or misunderstand your site's purpose
An llms.txt file solves these problems by providing a curated, hierarchical overview that ensures AI systems understand your site correctly.
Key Benefits
- Improved AI Citations: When AI assistants reference your content, they'll link to the most relevant pages
- Better Content Understanding: Clear descriptions help AI interpret your pages' purpose and value
- Enhanced Visibility: AI systems prioritize sites that are easy to understand and navigate
- Competitive Advantage: Most websites don't yet implement llms.txt—early adopters gain significant advantage
- Future-Proofing: As AI search grows, proper implementation becomes increasingly valuable
- Programmatic Parsing: The format allows both human readability and automated processing
Official LLMS.txt File Format Specification
The Standard Structure
According to the official proposal, the llms.txt file follows a specific format with required and optional sections:
Required Elements:
- H1 Header: The name of the project or site (only required section)
Optional Elements (in order):
- Blockquote: Short summary of the project with key information
- Details Sections: Zero or more markdown sections (paragraphs, lists, etc.) providing detailed project information
- File Lists: Zero or more sections delimited by H2 headers, containing URLs for further details
Official Format Template
# Title
> Optional description goes here
Optional details go here
## Section name
- [Link title](https://link_url): Optional link details
## Optional
- [Link title](https://link_url)
Important Note on the "Optional" Section: According to the specification, "the 'Optional' section has a special meaning—if it's included, the URLs provided there can be skipped if a shorter context is needed. Use it for secondary information which can often be skipped."
File List Format Rules
Each "file list" must follow this structure:
- A markdown list format
- Required: markdown hyperlink
[name](url) - Optional: colon
:followed by notes about the file
Complete Generic Example
# Your Company Name: Professional Services and Solutions
> Industry-leading provider of professional services, products, and consulting solutions
This llms.txt file provides structured information about our company, services,
and resources for use by Large Language Models and AI assistants.
## Main Pages
- [Home](https://yoursite.com/): Company overview, mission statement, and featured services
- [About Us](https://yoursite.com/about/): Company history, team members, and core values
- [Services](https://yoursite.com/services/): Complete catalog of professional services offered
- [Products](https://yoursite.com/products/): Product specifications, pricing, and availability
## Documentation
- [User Guide](https://yoursite.com/docs/guide/): Comprehensive user documentation and tutorials
- [API Reference](https://yoursite.com/docs/api/): Technical API documentation and examples
- [FAQ](https://yoursite.com/docs/faq/): Frequently asked questions and troubleshooting
## Resources
- [Blog](https://yoursite.com/blog/): Industry insights, updates, and best practices
- [Case Studies](https://yoursite.com/cases/): Detailed client success stories and implementations
- [White Papers](https://yoursite.com/papers/): In-depth research and technical analysis
## Optional
- [Press Releases](https://yoursite.com/press/): Company announcements and media coverage
- [Events](https://yoursite.com/events/): Upcoming webinars, conferences, and workshops
- [Careers](https://yoursite.com/careers/): Open positions and company culture information
Markdown File Extension Proposal
The .md Extension Standard
The official proposal also recommends: "We furthermore propose that pages on websites that have information that might be useful for LLMs to read provide a clean markdown version of those pages at the same URL as the original page, but with .md appended."
Implementation Examples:
- HTML page:
https://yoursite.com/documentation/guide/ - Markdown version:
https://yoursite.com/documentation/guide/.md
Special Case: URLs without file names should append index-commonmark.md instead of just .md
This dual-format approach allows:
- Human-friendly HTML versions for browsers
- Clean, structured markdown versions optimized for LLM processing
- No need for AI systems to parse complex HTML and CSS
- Faster, more accurate content extraction by AI assistants
Why Markdown Over Other Formats?
The proposal specifically addresses format choice:
"At the moment the most widely and easily understood format for language models is Markdown. Simply showing where key Markdown files can be found is a great first step. Providing some basic structure helps a language model to find where the information it needs can come from."
Why Markdown and not XML or JSON?
"The llms.txt file is unusual in that it uses Markdown to structure the information rather than a classic structured format such as XML. The reason for this is that we expect many of these files to be read by language models and agents. Having said that, the information in llms.txt follows a specific format and can be read using standard programmatic-based tools."
Benefits of the markdown approach:
- Human readable: Easy for site owners to create and maintain
- LLM optimized: AI models are extensively trained on markdown
- Programmatically parseable: Can be processed with standard tools, regex, and parsers
- Universal compatibility: Supported by all major AI systems
Automatic Generation vs. Manual Customization
Automatic Generation with Yoast SEO
As of version 26.6, Yoast SEO automatically generates llms.txt files for WordPress sites. This provides:
- Automatic updates: File regenerates when you publish new content
- Standard structure: Follows best practices automatically
- No technical knowledge required: Works out of the box
- SEO-optimized content: Uses your existing meta descriptions and titles
Yoast implementation location: The file is automatically created at https://yoursite.com/llms.txt
Important Note: While Yoast follows general markdown principles, verify that the generated output matches the official specification format, particularly regarding H1 headers, blockquotes, and H2 section headers.
When and Why to Customize Your LLMS.txt File
While automatic generation is excellent for most sites, manual customization becomes critical when:
- Strategic content prioritization: You want to emphasize specific pages over others
- AI-specific descriptions: Your meta descriptions target Google, but AI needs different context
- Complex site structure: Multiple content types, services, or products need clear categorization
- Brand positioning: You want to control exactly how AI systems describe your business
- Optional content separation: Using the special "Optional" section for secondary information
- Excluded content: Some pages shouldn't be presented to AI systems
Creating Effective LLMS.txt Files: Official Guidelines
The proposal provides specific recommendations:
"To create effective llms.txt files, consider these guidelines: Use concise, clear language. When linking to resources, include brief, informative descriptions. Avoid ambiguous terms or unexplained jargon. Run a tool that expands your llms.txt file into an LLM context file and test a number of language models to see if they can answer questions about your content."
Description Best Practices
- Concise and clear: One sentence maximum per link description
- Informative, not promotional: "Complete guide to API integration" not "The best guide ever!"
- Specific and concrete: "Product specifications, pricing, and compatibility" not just "Product information"
- Context-rich: Help AI understand scope and relevance
- No jargon: Use clear terminology or explain technical terms
- Action-oriented: Describe what the page contains, not marketing value
Complete Implementation Guide
Step 1: Planning Your Structure
Before creating your llms.txt file:
- Identify primary content types: Documentation, products, services, resources, etc.
- Select key pages: Limit to 20-50 most important pages
- Group related content: Create logical H2 sections
- Separate optional content: Use "Optional" section for secondary information
- Write AI-friendly descriptions: Focus on content, not marketing
Step 2: Creating the File
For WordPress Sites Using Yoast:
- Yoast v26.6+ automatically generates
/llms.txt - Review the generated file at
https://yoursite.com/llms.txt - Verify it follows official specification format
- If customization needed, see manual implementation below
For Manual WordPress Implementation:
- Create a custom page template that outputs plain text
- Use
header('Content-Type: text/plain; charset=utf-8'); - Create a WordPress page at
/llms.txtusing this template - Add your structured content following official format
For Static Sites:
- Create a file named
llms.txtin your root directory - Configure your server to serve it as
text/plain; charset=utf-8 - Follow the official specification format exactly
- Upload via FTP or your deployment process
Step 3: Advanced Implementation Examples
Software Documentation Site (Following Official Format):
# FastAPI Web Framework
> Modern, fast web framework for building APIs with Python 3.8+ based on standard Python type hints
FastAPI is designed for building high-performance APIs with automatic interactive documentation,
data validation, and async support.
## Getting Started
- [Installation](https://fastapi.com/install/): Installation instructions for various platforms and package managers
- [Tutorial](https://fastapi.com/tutorial/): Step-by-step guide to building your first FastAPI application
- [First Steps](https://fastapi.com/tutorial/first-steps/): Basic concepts and creating your first endpoint
## Core Features
- [Path Operations](https://fastapi.com/tutorial/path-operations/): Defining routes and HTTP methods
- [Request Body](https://fastapi.com/tutorial/body/): Handling JSON request bodies with Pydantic models
- [Query Parameters](https://fastapi.com/tutorial/query-params/): Working with URL query parameters
- [Dependencies](https://fastapi.com/advanced/dependencies/): Dependency injection system and reusable components
## Advanced Topics
- [Background Tasks](https://fastapi.com/tutorial/background-tasks/): Running tasks after returning responses
- [WebSocket Support](https://fastapi.com/advanced/websockets/): Real-time communication with WebSockets
- [Testing](https://fastapi.com/tutorial/testing/): Writing tests for FastAPI applications
## API Reference
- [APIRouter](https://fastapi.com/reference/apirouter/): Router class for organizing endpoints
- [HTTPException](https://fastapi.com/reference/exceptions/): Exception handling and error responses
- [Security](https://fastapi.com/reference/security/): Authentication and authorization utilities
## Optional
- [Release Notes](https://fastapi.com/release-notes/): Version history and changelog
- [Contributing Guide](https://fastapi.com/contributing/): How to contribute to FastAPI development
- [Community](https://fastapi.com/community/): Discussion forums and support channels
E-commerce Site (Following Official Format):
# TechStore Pro: Professional Technology Equipment
> Enterprise-grade technology products, IT solutions, and support services for businesses
TechStore Pro specializes in providing enterprise technology infrastructure,
from workstations to data center equipment, with 24/7 technical support.
## Product Categories
- [Business Laptops](https://techstore.com/laptops/): Mobile workstations, ultrabooks, and business notebooks with enterprise support
- [Desktop Workstations](https://techstore.com/workstations/): High-performance desktops for CAD, rendering, and development
- [Servers](https://techstore.com/servers/): Rack servers, tower servers, and blade systems for data centers
- [Networking Equipment](https://techstore.com/networking/): Enterprise switches, routers, firewalls, and access points
- [Storage Solutions](https://techstore.com/storage/): NAS systems, SAN storage, and backup appliances
## Solutions & Services
- [IT Consulting](https://techstore.com/consulting/): Infrastructure assessment, planning, and implementation services
- [Managed Services](https://techstore.com/managed/): 24/7 monitoring, maintenance, and technical support
- [Cloud Integration](https://techstore.com/cloud/): Hybrid cloud solutions and migration services
## Support & Resources
- [Knowledge Base](https://techstore.com/kb/): Technical articles, setup guides, and troubleshooting documentation
- [Product Specifications](https://techstore.com/specs/): Detailed technical specifications and compatibility information
- [Warranty Information](https://techstore.com/warranty/): Warranty terms, RMA process, and support coverage
## Optional
- [Company News](https://techstore.com/news/): Product launches and company announcements
- [Events](https://techstore.com/events/): Webinars, trade shows, and training sessions
- [Partner Program](https://techstore.com/partners/): Reseller and integration partner information
Professional Services Firm (Following Official Format):
# Strategic Consulting Partners
> Management consulting firm specializing in business transformation, operations, and growth strategies
We help organizations navigate complex business challenges through data-driven strategies,
operational excellence, and change management expertise.
## Core Services
- [Strategy Consulting](https://consulting.com/strategy/): Corporate strategy, market analysis, competitive positioning, and growth planning
- [Operations Excellence](https://consulting.com/operations/): Process optimization, efficiency analysis, and operational transformation
- [Digital Transformation](https://consulting.com/digital/): Technology adoption, digital strategy, and organizational change
- [Change Management](https://consulting.com/change/): Stakeholder engagement, communication planning, and implementation support
## Industry Expertise
- [Technology Sector](https://consulting.com/tech/): Services for software companies, SaaS businesses, and technology startups
- [Manufacturing](https://consulting.com/manufacturing/): Supply chain, production efficiency, and quality management
- [Financial Services](https://consulting.com/finance/): Regulatory compliance, risk management, and process automation
- [Healthcare](https://consulting.com/healthcare/): Operations improvement, patient experience, and regulatory compliance
## Resources
- [Case Studies](https://consulting.com/cases/): Detailed project examples with measurable outcomes and client testimonials
- [Insights](https://consulting.com/insights/): Industry analysis, market trends, and strategic perspectives
- [Methodologies](https://consulting.com/methods/): Our proprietary frameworks and approach to consulting engagements
## About
- [Our Team](https://consulting.com/team/): Senior consultants, industry experts, and leadership bios
- [Approach](https://consulting.com/approach/): Our consulting philosophy and engagement process
## Optional
- [Webinars](https://consulting.com/webinars/): Recorded presentations and upcoming online events
- [Press Coverage](https://consulting.com/press/): Media mentions and publications
- [Careers](https://consulting.com/careers/): Open positions and company culture
Technical Implementation Requirements
File Location and Headers
- Standard location:
https://yourdomain.com/llms.txt(root directory) - Content-Type header: Must be
text/plain; charset=utf-8 - No authentication: File must be publicly accessible
- HTTPS recommended: Serve via secure connection
- Subpath support: Optional implementation in subdirectories
Content Guidelines
- Character encoding: UTF-8 for international characters
- File size: Keep concise (20-50KB recommended)
- Line breaks: Standard Unix line breaks (\n)
- No HTML: Plain markdown only, no HTML tags
- Format compliance: Follow official specification exactly
What NOT to Include
- Administrative pages (login, dashboard, settings)
- Duplicate content under different URLs
- Pages requiring authentication
- Excessive marketing language
- Private or sensitive information
- Temporary or frequently changing content (unless you commit to updates)
WordPress Custom Implementation Code
For full control over your llms.txt file in WordPress, add this to your theme's functions.php or a custom plugin:
function custom_llms_txt_template() {
if ( is_page( 'llms-txt' ) || $_SERVER['REQUEST_URI'] == '/llms.txt' ) {
header( 'Content-Type: text/plain; charset=utf-8' );
// H1 - Required
echo "# Your Site Title\n\n";
// Blockquote - Optional but recommended
echo "> Your concise site description\n\n";
// Details paragraph - Optional
echo "Additional context about your site and its purpose.\n\n";
// H2 Section - Main Pages
echo "## Main Pages\n\n";
$pages = get_pages( array(
'sort_column' => 'menu_order',
'number' => 20
));
foreach ( $pages as $page ) {
$title = $page->post_title;
$url = get_permalink( $page->ID );
$desc = wp_trim_words( $page->post_excerpt ?: $page->post_content, 15 );
echo "- [$title]($url): $desc\n";
}
echo "\n";
// H2 Section - Recent Posts
echo "## Recent Articles\n\n";
$posts = get_posts( array(
'numberposts' => 10,
'post_status' => 'publish'
));
foreach ( $posts as $post ) {
$title = $post->post_title;
$url = get_permalink( $post->ID );
$desc = wp_trim_words( $post->post_excerpt ?: $post->post_content, 15 );
echo "- [$title]($url): $desc\n";
}
echo "\n";
// H2 Section - Optional
echo "## Optional\n\n";
echo "- [Sitemap](". site_url('/sitemap_index.xml') ."): XML sitemap for complete site structure\n";
exit;
}
}
add_action( 'template_redirect', 'custom_llms_txt_template' );
Verifying Your Implementation
Manual Verification
- Direct access: Navigate to
https://yoursite.com/llms.txt - Check Content-Type: Use browser DevTools Network tab to verify
text/plain - Validate format: Ensure H1, blockquote, H2 headers follow specification
- Test all links: Click every URL to verify accessibility
- Review descriptions: Check for clarity and conciseness
Programmatic Validation
# Check Content-Type header
curl -I https://yoursite.com/llms.txt
# Retrieve and display content
curl https://yoursite.com/llms.txt
# Validate format with regex
curl -s https://yoursite.com/llms.txt | grep -E "^# |^> |^## |^- \["
Testing with AI Systems
The most effective validation is asking AI assistants:
- "Can you read the llms.txt file from [yoursite.com] and tell me what the site offers?"
- "What are the main sections of [yoursite.com] based on its llms.txt file?"
- "Using information from [yoursite.com]'s llms.txt, what documentation is available?"
Tools and Resources
Official Tools
The proposal mentions several tools for working with llms.txt files:
- llms-txt Python Project: CLI and Python module for parsing llms.txt files and generating LLM context
- JavaScript Implementation: Sample implementation for web applications
- llms_txt2ctx Command: Converts llms.txt to structured XML context files
These tools can help you:
- Validate llms.txt format compliance
- Generate expanded context files for testing
- Automate llms.txt creation from existing content
- Test how AI systems interpret your file
Testing Your Implementation
As recommended in the proposal: "Run a tool that expands your llms.txt file into an LLM context file and test a number of language models to see if they can answer questions about your content."
Real-World Use Cases
The proposal outlines specific scenarios:
"llms.txt files can be used in various scenarios. For software libraries, they can provide a structured overview of documentation, making it easier for LLMs to locate specific features or usage examples. In corporate websites, they can outline organizational structure and key information sources. Information about new legislation and necessary background and context could be curated in an llms.txt file to help stakeholders understand it."
Additional Use Cases
- Personal portfolios: Help AI assistants answer questions about your skills and experience
- E-commerce sites: Guide AI to product categories, policies, and support resources
- Educational institutions: Summarize course offerings, faculty, and academic resources
- News organizations: Structure content by topic, section, and publication date
- Government agencies: Present regulations, services, and public resources clearly
Common Implementation Mistakes
Mistake 1: Wrong Format Structure
Problem: Not following the official H1 → blockquote → details → H2 sections format
Solution: Review the specification and ensure exact compliance
Mistake 2: Missing Content-Type Header
Problem: Serving as HTML or without proper text/plain header
Solution: Configure server or CMS to serve correct Content-Type
Mistake 3: Too Much Content
Problem: Including every page creates overwhelming files
Solution: Curate 20-50 key pages, use "Optional" section for secondary content
Mistake 4: Marketing Language in Descriptions
Problem: "Revolutionary solution!" provides no useful information to AI
Solution: Use descriptive, factual language about page contents
Mistake 5: Not Using the Optional Section
Problem: Mixing essential and secondary content
Solution: Place secondary information in "Optional" section for shorter contexts
The Future of LLMS.txt
Growing Adoption
Major AI platforms increasingly support llms.txt:
- OpenAI's GPT models (ChatGPT, API)
- Anthropic's Claude (all versions)
- Google's Gemini
- Microsoft's Copilot
- Perplexity AI
- AI-powered development tools
Potential Evolution
- Extended specifications: Additional optional sections for specific domains
- Versioning support: Multiple llms.txt versions for different AI systems
- Integration with Schema.org: Complementary structured data
- Automated validation tools: Built-in CMS and framework support
- Analytics integration: Tracking AI assistant access patterns
Conclusion: Implementation Checklist
Essential Steps:
- Verify existence: Check if
https://yoursite.com/llms.txtexists - Validate format: Ensure compliance with official specification (H1, blockquote, H2 sections)
- Review Content-Type: Confirm
text/plain; charset=utf-8header - Select key pages: Identify 20-50 most important pages
- Write clear descriptions: Create factual, concise summaries (avoid jargon)
- Organize hierarchically: Group content with logical H2 section headers
- Use Optional section: Separate secondary information properly
- Test with AI: Ask AI systems questions about your site
- Validate links: Ensure all URLs are accessible and correct
- Schedule reviews: Update quarterly or when major content changes
Remember: The llms.txt file represents a new paradigm in web communication. As the official proposal states, "Site authors know best, and can provide a list of content that an LLM should use." This is your opportunity to control how AI systems understand and represent your website to millions of users asking questions every day.
This guide is based on the official llms.txt proposal by Jeremy Howard (September 3, 2024). The specification continues to evolve—monitor the official proposal and community implementations for updates. For complete details, examples, and tools, visit the official llms.txt documentation.





