How to Add llms.txt to Your Website
Learn how to create and deploy an llms.txt file so AI assistants like Claude, ChatGPT, and Perplexity can understand your site's content. Includes format examples and common pitfalls.
What is llms.txt?
llms.txt is a plain-text file placed at the root of your website (e.g. https://example.com/llms.txt) that tells AI language model assistants how to understand and cite your site. It was proposed by Jeremy Howard and is now used by Anthropic, Cloudflare, and hundreds of developer-tool companies.
Why does it matter?
When a user asks ChatGPT, Claude, or Perplexity a question about your product, the AI may browse your site. Without llms.txt, it has to guess the structure of your docs. With llms.txt, you control what gets read, prioritised, and cited — leading to more accurate answers and more brand mentions.
The llms.txt format
The file uses Markdown. It starts with an H1 heading (your site name), an optional blockquote summary, and then H2 sections containing Markdown links to your most important pages. The companion file llms-full.txt can include full page content for smaller sites.
# Acme Docs
> API documentation and guides for Acme — the developer platform for building AI pipelines.
## Docs
- [Getting Started](https://acme.dev/docs/getting-started): Install the SDK and run your first pipeline
- [API Reference](https://acme.dev/docs/api): Full REST API reference
- [Authentication](https://acme.dev/docs/auth): API keys and OAuth
## Blog
- [Changelog](https://acme.dev/blog/changelog): Latest product updatesHow to deploy it
Place the file at /public/llms.txt in Next.js (or the web root of any framework). It must be accessible at https://yourdomain.com/llms.txt with a 200 status code and Content-Type of text/plain.
# Verify it's live
curl -I https://yourdomain.com/llms.txt
# Look for: HTTP/2 200 and content-type: text/plainCheck your score
Once deployed, scan your site to confirm the llms.txt check passes alongside your other agent-readiness signals.