llms.txt: Ultimate Guide to Make Content LLM-Ready
How to use llms.txt, Markdown mirrors, Next.js 15, and Sanity CMS to guide LLM crawlers and improve AI discovery of…

📚 Get Practical Development Guides
Join developers getting comprehensive guides, code examples, optimization tips, and time-saving prompts to accelerate their development workflow.
I was wrapping up a blog redesign when I realized something uncomfortable: LLM-based crawlers had no idea where to find the high-signal versions of my articles. They'd have to wade through navigation bars, cookie banners, share buttons, and footer links just to extract 2,000 words of technical content. The HTML experience was polished for humans, but there was no predictable entry point for agents that prefer clean Markdown or need a curated tour of the site.
Then I checked my server logs. In the last 24 hours alone, I had 2,700 requests from AI bots: 1,600 from ChatGPT-User, 273 from PerplexityBot, 32 from ClaudeBot, 32 from GPTBot, and dozens more from Amazonbot, DuckAssistBot, and others. These bots were crawling my site constantly, but without any guidance on what to read or how to parse it efficiently. That's when I started looking seriously at llms.txt.
The timing matters. ChatGPT, Claude, and Perplexity are increasingly used as primary research tools. When someone asks "How do I set up Docker dev containers?", these tools need to find and parse your content quickly. Without a standard, you're hoping generic web crawlers extract the right information from your HTML soup. With llms.txt, you're providing a VIP entrance that makes your content accessible the moment someone needs it.
What is llms.txt?
llms.txt is an emergent convention that signals to LLMs how to ingest your content efficiently. It doesn't replace sitemaps or robots.txt; it sits alongside them, showing which resources are ready for machine consumption, how they're structured, and why they matter. Think of it as a table of contents explicitly written for bots that want structured knowledge instead of marketing pages.
The format is intentionally simple. The file lives at /llms.txt, uses plain text or Markdown, and leads with a short synopsis of the site. Here's what mine looks like:
# Build with Matija
> Technical blog covering Next.js, Docker, and DevOps
## Recent Posts
[Configuring Dev Containers with Docker](https://buildwithmatija.com/blog/md/dev-containers): VSCode setup for React + FastAPI with hot reloading
[Understanding Next.js 15 Caching](https://buildwithmatija.com/blog/md/nextjs-caching): Deep dive into App Router cache strategies
[FastAPI Production Deployment](https://buildwithmatija.com/blog/md/fastapi-deployment): Complete guide to Docker, Nginx, and CI/CD
## About
[About Matija](https://buildwithmatija.com/about): Background and expertise
After the synopsis, you list content buckets: recent posts, topic clusters, documentation, anything that helps an agent pick the right starting point. Each entry is a classic Markdown link with a concise description, ideally pointing to a raw or Markdown-friendly version of the content. The spec doesn't dictate semantics, so you find yourself designing the taxonomy that best reflects your blog's structure.
You can see my complete implementation at buildwithmatija.com/llms.txt to get a feel for how it looks in practice.
The Complete Implementation Pattern
On its own, llms.txt gives crawlers a reliable anchor. Combined with a Markdown mirror of every post, it unlocks a complete ingestion pipeline. The pattern looks like this:
First, publish a canonical HTML post for humans. This is your styled, SEO-optimized page with all the user experience niceties. Second, generate clean Markdown versions of the same content at predictable URLs. Third, surface those Markdown URLs inside llms.txt so agents can skip HTML parsing and jump straight to the structured content. If you want to see exactly how to implement this, I walk through the complete Next.js 15 and Sanity setup here.
Once the Markdown endpoints exist, you wrap the rest of the discovery loop. Add alternate format links on each HTML article pointing to the Markdown sibling. Expand your sitemap with entries for both versions. Update robots.txt to explicitly allow common LLM bots and point them toward your llms.txt file. Together, you've made it painless for an agent to locate the highest fidelity representation of your work.
What This Gets You
Once implemented, several things improve immediately. When someone asks Claude or ChatGPT about your topic, they can cite your actual content with proper context instead of fragmented snippets. AI coding assistants can pull your documentation directly into their context window when a developer needs guidance. As LLM training runs evolve, your content is already in their preferred format, positioned for discovery.
From a cost perspective, if done right, these are static files sitting on a CDN. There's no server processing per request, no database queries, just pre-built content waiting to be fetched. Search engines appreciate alternate formats and comprehensive sitemaps, so you often see a small SEO boost as a side effect. The technical implementation guide covers how to achieve this with proper static generation.
The result is a small, well-defined convention that broadcasts intent. You're telling automated systems, "Here's the immutable version of this article, here's where new content shows up, and here's how to talk to me." If you run a technical blog, that's worth the effort. Start by deciding which sections you want machines to read, give them Markdown equivalents, and describe them coherently in llms.txt. You'll retain human-friendly pages while making life easier for the agents people increasingly rely on.
Getting Started
The concept is straightforward, but the implementation has some nuances, especially if you're working with a CMS that uses structured content like Portable Text. I've written a complete technical guide for Next.js 15 and Sanity CMS, including how to convert your content to Markdown, generate static routes efficiently, and avoid unnecessary server costs.
Questions? Drop them in the comments. I read every one.
Thanks,
Matija