← All posts

How to Create Your First llms.txt File (Step by Step)

I've seen a lot of guides that turn this into a bigger deal than it needs to be. Let me save you some time: creating an llms.txt file takes about ten minutes, and most of that is deciding which pages to include.

Here's exactly how to do it.

Step 1: Open a Text Editor

Seriously, that's step one. Open VS Code, Notepad, vim, whatever you use. Create a new file called llms.txt. You'll write it in Markdown.

Step 2: Add Your H1 Title

Every llms.txt starts with an H1 heading — your project or site name. This is the only required element in the entire spec.

# Your Company Name

Keep it clean. Just the name. No taglines, no emojis, no "Welcome to..."

Step 3: Add a Summary Blockquote

Right after the H1, add a blockquote that describes what your site or product does. Think of it as your elevator pitch for a machine.

# Acme Analytics

> A real-time analytics platform for SaaS companies. Tracks user behavior,
> conversion funnels, and revenue metrics with sub-second latency.

A few sentences is plenty. Be specific. "We help businesses grow" tells an AI nothing. "Real-time analytics for SaaS with sub-second latency" tells it a lot.

Step 4: Organize Your Links Under H2 Sections

This is where the actual value lives. Group your most important pages under descriptive H2 headings.

## Documentation
- [Getting Started](https://acme.com/docs/start): Setup guide for new users
- [API Reference](https://acme.com/docs/api): Complete REST API documentation
- [SDKs](https://acme.com/docs/sdks): Python, Node.js, and Go client libraries

## Product
- [Features](https://acme.com/features): Full feature overview
- [Pricing](https://acme.com/pricing): Plans and pricing details
- [Changelog](https://acme.com/changelog): Recent updates and releases

## Resources
- [Blog](https://acme.com/blog): Technical articles and product updates
- [Case Studies](https://acme.com/cases): How customers use Acme Analytics

Each link follows the pattern: [Page Title](URL): Short description

That description after the colon matters. It gives the AI context about what's on each page without having to visit it.

Step 5: Upload to Your Root Directory

Put the file at your site root so it's accessible at https://yoursite.com/llms.txt. The exact process depends on your setup:

  • Static sites (Next.js, Astro, etc.): Drop it in your public/ folder
  • WordPress: Upload via FTP/SFTP to your web root, or use the Yoast SEO plugin
  • Netlify/Vercel: Add it to your project's public directory
  • Apache/Nginx: Upload to /var/www/html/ or wherever your document root is

A Complete Example

Here's a realistic llms.txt for a fictional API company. Feel free to adapt this for your own site:

# DataPipe

> DataPipe is a real-time data streaming API for developers. It handles
> ingestion, transformation, and delivery of structured data at scale.

## Getting Started
- [Quickstart](https://datapipe.io/docs/quickstart): Send your first event in 5 minutes
- [Authentication](https://datapipe.io/docs/auth): API keys, OAuth, and token management
- [Rate Limits](https://datapipe.io/docs/limits): Usage limits and best practices

## API Reference
- [Events API](https://datapipe.io/docs/api/events): Create, query, and manage events
- [Streams API](https://datapipe.io/docs/api/streams): Configure data streams
- [Webhooks](https://datapipe.io/docs/api/webhooks): Real-time delivery to your endpoints

## Guides
- [Data Transformation](https://datapipe.io/blog/transforms): Transform data in-flight
- [Error Handling](https://datapipe.io/blog/errors): Retry logic and dead letter queues
- [Migration Guide](https://datapipe.io/blog/migration): Moving from Kafka or RabbitMQ

## Company
- [About](https://datapipe.io/about): Our team and mission
- [Pricing](https://datapipe.io/pricing): Free tier and paid plans
- [Status](https://status.datapipe.io): Service uptime and incident history

Clean, scannable, useful. An AI reading this instantly understands what DataPipe is, what it does, and where to find detailed information.

Common Mistakes to Avoid

Listing every page on your site. This isn't a sitemap. If you have 500 blog posts, don't list all 500. Pick the 10-20 that best represent your expertise.

Using HTML instead of Markdown. The spec is Markdown. No <a> tags, no <div>s. Just plain Markdown.

Forgetting the descriptions. A bare link like - [API Docs](https://example.com/api) is fine but wastes an opportunity. Adding : Complete REST API with 40+ endpoints gives the AI way more context.

Making it too long. Remember, LLMs have context window limits. A concise, focused file is more useful than an encyclopedic one. Aim for 20-50 links maximum.

Conflicting with your robots.txt. If you block AI crawlers in robots.txt but link to those same pages in llms.txt, you're sending mixed signals. Make sure the two files are consistent.

Optional: Create an llms-full.txt Too

Some sites also publish an llms-full.txt file — a more comprehensive version with full page content inlined as Markdown. This gives AI models everything they need in a single file without making additional requests.

This is overkill for most sites. But if you have critical documentation that you want AI to understand deeply, it can be worth the effort.

What Happens After You Publish It

Honestly? Maybe nothing right away. No AI system is going to email you a thank-you note. But your file is now discoverable by any tool or system that looks for it. And as AI-powered search and assistants evolve, having a well-structured llms.txt puts you ahead of sites that don't.

If you want to verify it's working, you can test it yourself: paste your llms.txt content into Claude or ChatGPT and ask it to summarize your site. You'll see immediately whether your descriptions are clear enough.

Generating llms.txt from Web Data

If you're building a tool that needs to understand other websites — and they don't have an llms.txt — you can create the same structured understanding by fetching pages with link.sc. The fetch API converts any webpage to clean Markdown, giving you the same LLM-friendly format that llms.txt provides, but for any URL on the web.


Want to read any website the way llms.txt intends? link.sc converts web pages to clean, structured Markdown — purpose-built for LLMs. Get started free.