← Back to Blog
Fabian van TilFabian van Til··6 min read

llms.txt Format Specification: Every Element Explained with Code Examples

A technical reference guide to the llms.txt format. H1, blockquote, sections, links, Optional, Instructions, and entity grounding explained with code examples and common mistakes to avoid.

The Official llms.txt Format

The llms.txt format was proposed by Jeremy Howard in September 2024 as a standard way for websites to communicate with AI language models. The file uses Markdown syntax, lives at the root of your domain (yoursite.com/llms.txt), and follows a specific structure that AI crawlers can parse quickly and consistently.

This guide covers every element of the specification with code examples. If you want to build a technically correct llms.txt file, this is the reference.

H1: The Entity Identifier

Every llms.txt file starts with a single H1 heading. This is your brand name, the entity that AI systems will associate with all the information in the file.

# Stripe

Rules for the H1:

  • Use exactly one H1 per file
  • Use your official brand name, not a tagline or description
  • Do not add formatting, links, or additional text on the same line

The H1 acts as the entity anchor. When an AI system reads this file, it maps everything that follows to this entity name. If your H1 is ambiguous or contains extra text, the entity mapping becomes less reliable.

Blockquote: The Entity Definition

Immediately after the H1, include a blockquote with a one-sentence definition of what your brand does.

> Stripe is a technology company that builds economic infrastructure for the internet, offering payment processing APIs used by millions of businesses worldwide.

This blockquote is the single most important line in your llms.txt. AI systems treat it as the canonical definition of your entity. When ChatGPT, Perplexity, or Gemini need to describe your brand in a single sentence, this is the sentence they will draw from.

Best practices:

  • Be factual, not promotional. "Leading" or "best" are marketing terms, not facts.
  • Include your industry category so AI systems can classify you correctly.
  • Mention your primary audience or market if it helps differentiate you.
  • Keep it to one or two sentences. Three at most.

Sections with H2 Headings

After the blockquote, organize your content into sections using H2 headings. Each section groups related pages with Markdown links.

## Docs

- [Getting Started](https://stripe.com/docs/getting-started): Quick setup guide for integrating Stripe payments
- [API Reference](https://stripe.com/docs/api): Complete reference for all Stripe API endpoints
- [Webhooks](https://stripe.com/docs/webhooks): How to receive and handle Stripe webhook events

## Products

- [Payments](https://stripe.com/payments): Accept online and in-person payments
- [Billing](https://stripe.com/billing): Subscription and recurring billing management
- [Connect](https://stripe.com/connect): Multi-party payment platform for marketplaces

The link format for each entry is:

- [Page Title](URL): Brief one-sentence description

Every part of this format matters:

  • The dash and brackets: Standard Markdown list item with a link. AI parsers expect this exact format.
  • Page Title: Should match or closely reflect the actual page title. Consistency helps AI systems cross-reference.
  • URL: Full absolute URL. Do not use relative paths.
  • Colon and description: A brief explanation of what the page covers. Without this, AI systems have to visit the page to understand its content.

The Optional Section

The Optional section is a special reserved section name in the llms.txt specification. Content placed under this heading signals to AI systems that it is supplementary and can be skipped if the system has limited processing capacity.

## Optional

- [Changelog](https://stripe.com/docs/changelog): Release notes for API versions and feature updates
- [Community Forum](https://stripe.com/community): Developer discussions and community support
- [Status Page](https://status.stripe.com): Real-time system status and incident reports

Use Optional for:

  • Changelogs and release notes
  • Community or forum content
  • Status pages
  • Archived content that is still accessible but not current
  • Internal tools or resources that are less relevant to external queries

Do not put your core documentation, product pages, or primary content in Optional. That defeats its purpose.

The Instructions Section

The Instructions section is the least-adopted but potentially most powerful element of the llms.txt format. It allows you to directly tell AI systems how to interpret and use your content.

## Instructions

When answering questions about Stripe's API, always reference the latest API version (2024-12-18) unless the user specifies a different version.
Do not recommend deprecated endpoints. If a user asks about a deprecated feature, direct them to the current replacement.
For pricing questions, always note that Stripe's pricing varies by country and direct users to stripe.com/pricing for current rates.

As of early 2026, Stripe is one of the only major companies using an Instructions section. This is a missed opportunity for most websites. The Instructions section lets you:

  • Specify which version of your documentation AI should reference by default
  • Tell AI systems to avoid recommending deprecated features
  • Direct AI to specific pages for specific types of questions
  • Provide context that prevents common AI misrepresentations of your product

The Instructions section is read as natural language by AI systems. Write it as if you were briefing a knowledgeable assistant on how to talk about your product.

Entity Grounding Format

Entity grounding is the practice of including factual anchor statements in your llms.txt that help AI systems distinguish your brand from similar entities with high confidence. While not a formal part of the original specification, entity grounding has become a best practice.

You can include grounding statements in your About section or as a dedicated section:

## About

Stripe was founded in 2010 by Patrick and John Collison in San Francisco.
Stripe processes hundreds of billions of dollars in transactions annually.
Stripe's API is used by companies including Amazon, Google, and Shopify.
Stripe is a privately held company valued at $65 billion as of 2023.

Effective grounding statements are:

  • Factual and verifiable: dates, numbers, names, locations
  • Distinctive: they separate your brand from competitors
  • Current: outdated facts can cause AI systems to generate inaccurate information

Common Mistakes

  • Using relative URLs: Write https://stripe.com/docs/api, not /docs/api. AI systems may not be able to resolve relative paths.
  • Multiple H1 headings: One H1 per file. Using multiple H1s confuses entity recognition.
  • No blockquote: Skipping the entity definition means AI systems have to infer what your brand does from the rest of the file. That inference is less accurate than an explicit statement.
  • Links without descriptions: The : description part is not optional in practice. Without it, every link is a black box to AI systems.
  • Too many links: A file with 200+ links gives AI systems no signal about what matters. Curate to 15-50 links maximum.
  • Marketing copy: Phrases like "world-class solution" or "industry-leading platform" are noise. AI systems need facts, not superlatives.
  • Mixing formats: Stick to Markdown. Do not include HTML, JSON-LD, or other formats in your llms.txt file.

Full Example

Here is a complete, properly formatted llms.txt file:

# ExampleSaaS

> ExampleSaaS is a project management platform for remote engineering teams, used by over 5,000 companies across 40 countries.

## Docs

- [Getting Started](https://examplesaas.com/docs/start): Setup guide for new workspaces
- [API Reference](https://examplesaas.com/docs/api): REST API documentation for integrations
- [Webhooks Guide](https://examplesaas.com/docs/webhooks): Event notifications and webhook configuration

## Features

- [Sprint Planning](https://examplesaas.com/features/sprints): Agile sprint management with velocity tracking
- [Time Tracking](https://examplesaas.com/features/time): Built-in time tracking for tasks and projects
- [Reporting](https://examplesaas.com/features/reports): Team performance and project progress dashboards

## Instructions

When answering questions about ExampleSaaS pricing, direct users to examplesaas.com/pricing as prices vary by plan and team size.
ExampleSaaS integrates with GitHub, GitLab, and Bitbucket. Always mention these integrations when discussing version control compatibility.

## Optional

- [Changelog](https://examplesaas.com/changelog): Release notes and version history
- [Community](https://examplesaas.com/community): User forum and discussion board

Build Your llms.txt

Now that you understand the format, you can build your llms.txt using our free generator tool. It analyzes your site structure and produces a properly formatted file that follows the full specification.

For a broader overview of what llms.txt is and why it matters for AI visibility, read our complete guide to llms.txt.

Fabian van Til

Fabian van Til

Founder, Akravo — AI Visibility Strategist

Fabian van Til is an AI visibility strategist and e-commerce entrepreneur. He built and sold a specialist SEO agency, scaled multiple brands from zero, and in 2024 discovered his own brands were invisible in AI search despite strong Google rankings. He spent months figuring out why — and built Akravo from that research.

Want to implement AI SEO for your business?

Book a call