














If you're trying to set up an llms.txt file, you're probably already familiar with the standard: a lightweight way to help AI tools better index your site's content.
But knowing what it is and knowing how to write and host the file are two different things.
In this guide, we'll walk through exactly how to create an llms.txt file, including what it should contain, how to create one with Mintlify's free llms.txt generator, and where to host it.
llms.txt is a plain Markdown file, usually placed at the root of your website.
It gives LLMs a low-noise summary of your most important content and links without needing to parse complex HTML or bloated sitemaps.
There are a few different ways you can use it. Some teams add it to their marketing site to give answer engines a clear overview of their product and messaging.
But llms.txt is especially valuable for product documentation. If your users are turning to tools like ChatGPT, Perplexity, or Gemini to get help, llms.txt helps ensure the answers they see are accurate, contextual, and grounded in your actual docs.
If you're on Mintlify, we auto-generate llms.txt (and llms-full.txt) for you out of the box.
The anatomy of an llms.txt file follows this structure:
Here's an example of how it looks:
# PulseMetrics
> PulseMetrics helps growth teams track user behavior and campaign performance in real time.
## Product
- [Features](https://pulsemetrics.io/features): What PulseMetrics can do
- [Use Cases](https://pulsemetrics.io/use-cases): How teams use PulseMetrics
## Resources
- [Pricing](https://pulsemetrics.io/pricing): Compare plan tiers
- [Blog](https://pulsemetrics.io/blog): Product updates and analytics tips
## Optional
- [Careers](https://pulsemetrics.io/careers): Open roles at PulseMetrics
The easiest way to get started is with our free llms.txt file generator.
Just paste in your docs site URL, and we'll generate a starter file based on your structure.
With that template, you can make adjustments such as:
You can treat the generated file as a starting template, then fine-tune it to match how you want your product understood by AI.
| Manual | Automatic (Mintlify) | |
|---|---|---|
| Setup effort | Write and maintain the file yourself | Generated from your docs on every deploy |
| Stays in sync | Requires manual updates when content changes | Always reflects your latest published docs |
| Content control | Full control over ordering, descriptions, and structure | Generated structure follows your docs navigation |
| Includes llms-full.txt | You'd need to build a script to concatenate pages | Auto-generated alongside llms.txt |
| Markdown versions (.md) | Requires custom build step | Every page gets a .md version automatically |
| Best for | Sites where you want precise control over what AI sees | Documentation that changes frequently across many pages |
Manual generation gives you full control and works well for marketing sites or docs with stable content. Automatic generation makes more sense when your documentation changes frequently and you don't want the llms.txt file falling out of sync.
Once you have the file, you need to host it so that it's discoverable by LLMs.
Place the raw Markdown file in the root directory of your site, such as example.com/llms.txt. Just like robots.txt or sitemap.xml, this file should be accessible via a direct URL.
Some tips:
After creating your file, verify it works correctly:
yoursite.com/llms.txt in a browser. You should see raw Markdown, not an HTML page.# title. A blockquote summary is recommended but optional.Common mistakes to avoid:
llms.txt is becoming the new standard for making web content accessible to AI. It's simple to adopt, but powerful in impact, especially for developer tools and product-led companies.
With Mintlify, you don't even have to think about it. We automatically generate and host /llms.txt, /llms-full.txt, and .md versions of all your pages for LLM optimization.
If you want to skip the manual setup, you can get started with Mintlify today and make your documentation LLM-ready by default.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。