Back to Blog
llms.txtTechnical GuideAI Crawlers

How to Create an llms.txt File: Complete Guide

Step-by-step guide to creating an llms.txt file — the specification, format, examples, and best practices for AI discoverability.

22 January 20269 min read

Large language models need structured information to understand and represent websites accurately. The llms.txt standard provides a simple, effective way to communicate your site's purpose, structure, and key content to AI systems.

What Is llms.txt?

llms.txt is a markdown file placed at the root of your website (yoursite.com/llms.txt) that describes your site in a format optimised for AI consumption. Think of it as a structured introduction that tells LLMs what your website is about, how it's organised, and where to find important information.

Unlike robots.txt which controls crawler access, llms.txt actively provides context. When an AI system encounters your site, it can read this file to quickly understand your content structure, primary topics, and key resources.

The specification emerged from the need for a standardised way to help AI systems accurately represent websites in their responses. Adoption has grown significantly, with major platforms and businesses implementing llms.txt files to improve their AI discoverability.

The llms.txt Specification

The llms.txt format follows a straightforward markdown structure. The specification requires a markdown file located at /llms.txt in your site's root directory, using standard markdown syntax with specific sections that provide context about your website.

Required Elements

Site name and description: Start with your site's name as an H1 heading, followed by a blockquote with a concise description of its purpose.

Content sections: Use H2 headings to organise information about your site into logical sections.

Links to key resources: Include markdown links to your most important pages to help AI systems navigate your content.

Optional Elements

Update information: When the file was last modified to help AI systems understand content freshness.

Contact details: How users or AI systems can find support or additional information.

Creating Your llms.txt File: Step-by-Step

Step 1: Analyse Your Website Structure

Before writing anything, map out your website's organisation. Identify:

  • Primary sections and categories
  • Key pages that represent your core offerings
  • Main topics or services you provide
  • Your target audience and their needs

Step 2: Draft the Core Content

Create a new markdown file and start with the essential elements:

# Your Site Name

> Brief description of what your site does and who it serves.

## Key Content

- [About Us](https://yoursite.com/about): Company background and mission
- [Documentation](https://yoursite.com/docs): Technical documentation
- [Blog](https://yoursite.com/blog): Industry insights and guides

## Topics

- Topic area one
- Topic area two
- Topic area three

Step 3: Add Descriptive Detail

Expand each section with relevant information. For content structure, describe what users find in each area. For key topics, be specific about what you cover.

A good llms.txt file balances comprehensiveness with conciseness. AI systems process this efficiently, but clarity matters more than length.

Step 4: Include Important Resources

Add links to critical pages with clear descriptions:

## Important Resources

- [About Us](https://yoursite.com/about): Company background and team
- [Documentation](https://yoursite.com/docs): API reference and guides
- [Contact](https://yoursite.com/contact): Support and enquiries

Step 5: Validate and Test

Before publishing, verify:

  • Valid markdown syntax
  • All URLs are absolute and correct
  • Content accurately represents your site
  • File is properly formatted and accessible at your domain root

Use our llms.txt generator to create and validate your file automatically. The tool checks formatting, suggests improvements, and ensures specification compliance.

Complete llms.txt Example

Here's a comprehensive example demonstrating best practices:

# Example Company

> Enterprise project management platform that helps distributed teams plan, track, and deliver software projects.

## How It Works

- Teams create projects and break work into tasks
- Automated workflows handle status updates and notifications
- Real-time dashboards show progress across all projects
- Integrations connect with GitHub, Slack, and Jira

## Features

- [Project Planning](https://example.com/features/planning): Sprint planning, roadmaps, and milestone tracking
- [Task Management](https://example.com/features/tasks): Kanban boards, assignments, and priority management
- [Reporting](https://example.com/features/reports): Velocity charts, burndown reports, and custom dashboards
- [Integrations](https://example.com/features/integrations): 50+ integrations with popular development tools

## Resources

- [Documentation](https://example.com/docs): Complete API reference and user guides
- [Blog](https://example.com/blog): Product updates and engineering insights
- [About](https://example.com/about): Company background and mission
- [Contact](https://example.com/contact): Support and sales enquiries

## Plans

- Free: Up to 5 users, basic features
- Pro: Unlimited users, advanced reporting
- Enterprise: Custom integrations, dedicated support

Best Practices

Be Accurate and Current

Your llms.txt file should reflect your current website state. Outdated information leads to inaccurate AI responses about your site. Update the file when you add major sections, change your focus, or restructure content.

Prioritise Clarity Over Completeness

Don't list every page or minor topic. Focus on the most important aspects that help AI systems understand your core purpose and structure. A concise, well-organised file serves better than an exhaustive catalogue.

Use Descriptive Language

Write for both AI systems and humans who might read the raw file. Clear descriptions help LLMs generate accurate responses about your site.

Structure Content Logically

Organise sections in order of importance. Start with identity and purpose, then move to structure and specific details. This mirrors how AI systems typically process information.

Maintain Consistency

Use consistent terminology throughout your llms.txt file and across your website. If you call something "Documentation" in your navigation, use the same term in llms.txt rather than "Docs" or "Guides".

Include Absolute URLs

When linking to resources, use absolute URLs (https://yoursite.com/page) rather than relative paths. This prevents ambiguity for AI systems that may encounter your llms.txt file in various contexts.

Keep It Updated

Set a regular review schedule. Many sites update their llms.txt quarterly or when making significant content changes.

Validating Your llms.txt File

After creating your file, validate it to ensure proper implementation:

Technical Validation

  • File is accessible at yoursite.com/llms.txt
  • Returns appropriate content-type header
  • Contains valid markdown syntax
  • All links work and point to correct destinations

Content Validation

  • Accurately represents current website structure
  • Describes key topics comprehensively
  • Provides useful context without unnecessary detail
  • Uses clear, professional language

Our AI readiness scanner automatically checks your llms.txt implementation and provides specific recommendations for improvement. The AI readiness score factors in llms.txt quality alongside other optimisation elements.

Common Mistakes to Avoid

Overly Generic Descriptions

"We provide services" tells AI systems nothing useful. Be specific: "We provide automated bookkeeping services for UK small businesses" gives clear context.

Listing Every Page

Your llms.txt shouldn't mirror your sitemap. Focus on primary sections and key resources that represent your core offering.

Neglecting Updates

A llms.txt file that doesn't reflect your current content structure actively harms AI understanding of your site.

Inconsistent Formatting

Mixing formatting styles or using non-standard markdown makes parsing harder for AI systems. Stick to clean, standard markdown.

Missing Contact or About Information

AI systems often need to direct users to contact or background information. Include these key pages in your resources section.

Deploying Your llms.txt

Once you've created your file, deployment is straightforward:

  1. Save your content as llms.txt
  2. Upload to your website's root directory (or public/ folder for static site generators)
  3. Verify accessibility by visiting yoursite.com/llms.txt
  4. Test with our llms.txt validation tool
  5. Monitor AI references to your site to gauge effectiveness

For static sites, place the file in your public or root directory. For dynamic platforms, configure your server to serve the file at the root path. Most content management systems allow custom file placement.

Measuring Impact

After implementation, track how AI systems reference your website:

  • Monitor AI-generated descriptions of your site for accuracy
  • Check whether LLMs correctly identify your key services or content
  • Note improvements in how AI systems direct users to specific pages
  • Use our scanner regularly to maintain optimal llms.txt implementation

The llms.txt standard represents a significant step towards AI-first web architecture. As AI systems become primary discovery mechanisms, structured context files like llms.txt ensure your website is accurately represented and easily understood by large language models.