llms.txt File: What It Is, How to Create One (Template)
Description
The llms.txt file is a new (unofficial) standard proposed in September 2024 that presents the most important content of a site in a clear and structured format for LLMs.
Placed at the root of the domain, it contains a clean and contextual version of the main content in Markdown, making it easier for AI models to understand.
Why is this important for ai search?
The llms.txt acts as a map for AI, telling systems which URLs contain high-quality content suitable for LLMs.
It addresses the limits of LLM context windows by sparing them complex HTML, scripts and navigation.
No major AI engine has officially confirmed that it uses llms.txt yet: treat it as a low-cost complement to robots.txt, the sitemap and well-structured pages, not as a visibility lever on its own.
Technical details
- llms.txt file accessibility
- llms.txt file format (MIME type)
- llms.txt file content and structure
- Complete llms.txt example (template)
- llms.txt, robots.txt and sitemap.xml: what each file does
- Useful resources and links
1. llms.txt file accessibility
The llms.txt file is a proposed standard that gives large language models (LLMs) and AI engines a clean, structured summary of a website's most useful content. It does not control access: crawling permissions are still managed in robots.txt. Its presence and accessibility are the first checks of a GEO technical audit.
- Location: The file must be located at the root of the domain, at /llms.txt. A second, optional file, /llms-full.txt, can hold the full text of the key pages. For example, for the domain example.com, the file must be accessible via https://example.com/llms.txt.
- HTTPS: Serve the file over HTTPS, with any HTTP request redirected to the HTTPS version.
- HTTP status code: The server must return an HTTP 200 OK status code for /llms.txt. A 404 Not Found or any other error code means AI systems cannot read the file.
2. llms.txt file format (MIME type)
To be read correctly by AI engines, the llms.txt file must be served with the appropriate MIME type.
- MIME type: Serve the file as text/plain or text/markdown. An HTML response (for example a CMS page rendered in a template) is a common mistake.
- Encoding: The file must be encoded in UTF-8 to ensure compatibility with all characters and avoid interpretation issues.
- Minimum content: The file must not be empty. At a minimum, it should contain a title and a short summary describing the site.
3. Content and structure of the llms.txt file
The llms.txt file is written in Markdown and structured to give AI models clear, concise information: a title, a summary, sections and links to the key pages.
Title: The file starts with the name of the site or project as a level 1 Markdown heading (#).
# Example Company
Short summary: Right after the title, add a short summary as a blockquote (>), with the key information an LLM needs to understand the rest of the file, such as the site's purpose or the type of content it offers.
Sections: Organize the file into sections with level 2 headings (##). Each section lists the most useful pages for one topic, such as products, documentation or guides. Example section:
## Products
Links to key pages: Under each section, list the important pages as Markdown links. These links let LLMs discover and explore relevant content in a structured way.
- [Pricing](https://www.example.com/pricing): plans, prices and free trial
Link notes: Add a short note after each link to explain what the page contains. This helps LLMs judge which page answers which question.
4. Complete llms.txt example (template)
Copy this template, replace the example pages with your own key pages and save it as llms.txt at the root of your domain.
# Example Company
> Example Company publishes project management software for construction firms. This file lists the pages that best describe our product, pricing and documentation.
## Product
- [Features](https://www.example.com/features): planning, site reports and team scheduling
- [Pricing](https://www.example.com/pricing): plans, prices and free trial
## Documentation
- [Getting started](https://www.example.com/docs/getting-started): set up a first project in 10 minutes
- [Integrations](https://www.example.com/docs/integrations): connectors with accounting and ERP tools
## Optional
- [Blog](https://www.example.com/blog): industry guides and product newsThe Optional section is part of the llmstxt.org proposal: it groups links a model can skip when it needs a shorter context. Keep the file short, list only pages that are useful and up to date, and update it when a key page changes.
5. llms.txt, robots.txt and sitemap.xml: what each file does
The three files are often confused. They do not do the same job and llms.txt replaces neither of the other two.
- robots.txt: allows or blocks crawling of your URLs, bot by bot, including AI bots such as GPTBot, OAI-SearchBot and PerplexityBot. It is the file that decides whether AI engines can access your pages.
- sitemap.xml: lists every indexable URL with its last modification date, so that search engines such as Google and Bing discover and refresh your pages.
- llms.txt: summarizes your most useful pages in Markdown for language models. No major AI engine has officially confirmed that it reads it, so treat it as a complement.
In practice, check robots.txt and the sitemap first: a page blocked to AI bots or missing from the index will not be cited, whatever your llms.txt says.