How to generate llms.txt

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 generator, and where to host it.
What is llms.txt?
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.
What is an example llms.txt file format?
The anatomy of an llms.txt file follows this structure:
- Title: Site or company name (required)
- > Blockquote: Short summary, e.g. description or key benefits
- ## Sections: Key content areas
- [Link](url): Description: List important pages under each section
- ## Optional: For helpful but lower-priority resources
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
How to generate an llms.txt file
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:
- Customize the section names to reflect your actual product experience
- Add brief, human-readable descriptions to help models interpret the page's purpose
- Reducing URLs - you don’t need to include every URL, just the most useful and representative ones
You can treat the generated file as a starting template, then fine-tune it to match how you want your product understood by AI.
How to host your llms.txt file
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:
- Ensure it serves as plain text or Markdown, not wrapped in HTML
- If you’re using a static site generator, configure a public folder or route to expose the file
- If your docs live under a subpath (e.g., example.com/docs), you can also serve it at /docs/llms.txt
Get started even faster
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.