Back to Blog
llms.txtAIDocumentationSEOChatGPTClaude

How to Create an llms.txt File for Your Documentation (2025 Guide)

Learn how to create an llms.txt file that helps AI assistants like ChatGPT and Claude understand your documentation. Free generator included.

Gautam Sharma

Author

4 min read

Your documentation is invisible to AI assistants. Here's how to fix that in 2 minutes.

What is llms.txt?#

llms.txt is a simple text file that helps AI assistants understand your website's documentation. Think of it as robots.txt, but for AI language models instead of search engine crawlers.

When someone asks ChatGPT, Claude, or other AI assistants about your product, having an llms.txt file helps them provide accurate, up-to-date information from your actual documentation.

Why Your Documentation Needs llms.txt#

AI assistants are becoming the new search engines. Users increasingly ask ChatGPT questions like:

  • "How do I authenticate with the Stripe API?"
  • "What's the syntax for Tailwind's grid classes?"
  • "How do I deploy to Vercel?"

Without llms.txt, AI models rely on their training data—which might be outdated or incomplete. With llms.txt, you're giving AI assistants a direct map to your current documentation.

Companies Already Using llms.txt#

Major developer-focused companies have adopted llms.txt:

  • Anthropic (creators of Claude)
  • Cloudflare
  • Vercel
  • Stripe

If you're building developer tools or APIs, you should too.

llms.txt Format Specification#

The format is intentionally simple:

txt
# Your Site Name
 
> A brief description of what your documentation covers.
 
## Section Name (optional)
 
- [Page Title](https://yoursite.com/docs/page): Brief description
- [Another Page](https://yoursite.com/docs/another): Description

Key Rules#

  1. Start with a title using # Title
  2. Add a description using > Description
  3. List pages using - [Title](URL): Description
  4. Group related pages under ## Section headings (optional)
  5. Keep descriptions concise — one sentence per page

llms.txt Example#

Here's a real example for a documentation site:

txt
# Dokly Documentation
 
> Dokly is a documentation platform for creating beautiful, AI-ready docs.
 
## Getting Started
 
- [Quick Start](https://docs.dokly.co/quickstart): Create your first documentation site in 5 minutes
- [Installation](https://docs.dokly.co/installation): System requirements and setup instructions
- [Configuration](https://docs.dokly.co/configuration): Configure your project settings and branding
 
## Features
 
- [MDX Components](https://docs.dokly.co/components): Built-in components like Callouts, Tabs, and Code blocks
- [AI Writing](https://docs.dokly.co/ai-writing): Use AI to improve and expand your documentation
- [Custom Domains](https://docs.dokly.co/custom-domains): Set up your own domain for your docs
 
## API Reference
 
- [Authentication](https://docs.dokly.co/api/auth): API authentication and tokens
- [Pages API](https://docs.dokly.co/api/pages): Create, read, update, and delete pages

How to Create Your llms.txt File#

The fastest way to create an llms.txt file:

  1. Go to dokly.co/tools/llms-txt-generator
  2. Enter your site name and description
  3. Either:
    • Quick Import: Paste your sitemap URL to auto-import all pages
    • Manual Entry: Add pages one by one
  4. Add descriptions for each page
  5. Copy or download your llms.txt file

No signup required. Completely free.

Option 2: Create Manually#

  1. Create a new file called llms.txt
  2. Add your site title and description
  3. List each documentation page with its URL and description
  4. Save the file to your site's root directory

Where to Host Your llms.txt File#

Place the file at your domain root:

Text
https://yourdomain.com/llms.txt

Or in your docs subdomain:

Text
https://docs.yourdomain.com/llms.txt

Platform-Specific Instructions#

Vercel/Next.js: Place llms.txt in your public folder.

GitHub Pages: Place llms.txt in your repository root.

Netlify: Place llms.txt in your publish directory.

Dokly: We generate llms.txt automatically for all documentation sites.

Best Practices#

Do:#

  • Keep descriptions concise and informative
  • Update the file when you add or remove pages
  • Include your most important pages
  • Group related pages under sections
  • Use clear, descriptive page titles

Don't:#

  • Include every single page (focus on documentation)
  • Write long descriptions (one sentence is ideal)
  • Include internal/private pages
  • Forget to update it when docs change

llms.txt vs llms-full.txt#

Some sites also create llms-full.txt which includes the actual content of each page, not just links. This is useful for smaller documentation sites but can get very large.

For most sites, llms.txt with links and descriptions is sufficient.

Get Started#

Creating an llms.txt file takes just a few minutes but makes your documentation accessible to the growing number of users who rely on AI assistants.

Create your llms.txt file free →

Or if you want documentation that generates llms.txt automatically, along with AI writing assistance and beautiful MDX components, try Dokly free.

Written by Gautam Sharma

Building Dokly — documentation that doesn't cost a fortune.

Follow on Twitter →

Ready to build better docs?

Start creating beautiful documentation with Dokly today.

Get Started Free