// Technical Tutorial · 10 Min Read

How to Create and Deploy an llms.txt File

A practical engineering guide to generating, validating, and deploying standardized Markdown indexes for Anthropic Claude, ChatGPT Search, and Perplexity.

Published: 2026-08-26 • Author: CiteDo Research • Category: AEO & AI Indexing

The Core Problem: HTML Noise in the AI Era

Traditional web pages are designed for visual human consumption: they contain CSS frameworks, JavaScript bundles, analytics trackers, navigation sidebars, and advertising banners. When an AI search engine (such as ChatGPT Search or Perplexity) retrieves a web page in real time, converting raw DOM trees into tokenized text burns a large share of the LLM's context window on navigational boilerplate — the llmstxt.org proposal puts it bluntly: 'every wasted token costs time and money.'

The /llms.txt proposal solves this by providing a lightweight, standardized Markdown index located at https://yourdomain.com/llms.txt. It acts as an authoritative table of contents, directing AI reasoning engines straight to clean Markdown content, reducing the guesswork that produces wrong answers.

Standard Anatomy of an /llms.txt File

According to the llmstxt.org specification, a compliant file follows a strict hierarchical Markdown format:

# Project / Brand Name

> One-sentence authoritative summary of what your product or service does.

## Core Documentation & Product Links

- [Getting Started](https://example.com/docs/intro): Complete setup guide and SDK initialization.
- [API Reference](https://example.com/docs/api): REST & GraphQL endpoint schema with authentication details.
- [Pricing & Plans](https://example.com/pricing): Transparent tier breakdown and usage limits.

## Optional

- [Changelog](https://example.com/changelog): Weekly release notes and bug fixes.

Don't write your llms.txt manually

Use our visual builder with SaaS, DTC, and Agency templates to generate formatted files in 30 seconds.

Open Generator (Free) →

How to Deploy llms.txt on Popular Stacks

1. Next.js (App Router & Pages Router)

In Next.js, static files located in the /public directory are automatically served at the domain root without route handlers.

# Project root
├── app/
├── public/
│   ├── favicon.ico
│   ├── llms.txt          <-- Place here
│   └── llms-full.txt     <-- Place here
└── package.json

2. Cloudflare Pages & Cloudflare Workers

If using Cloudflare Workers for edge routing, ensure you set the correct MIME type header (text/plain; charset=utf-8):

export default {
  async fetch(request, env) {
    const url = new URL(request.url);
    if (url.pathname === "/llms.txt") {
      return new Response(LLMS_TXT_CONTENT, {
        headers: { "Content-Type": "text/plain; charset=utf-8" },
      });
    }
    return fetch(request);
  }
};

3. Shopify & E-Commerce Platforms

Shopify does not allow uploading arbitrary files to the root directory by default. One workaround is to upload llms.txt to Settings > Files and redirect /llms.txt to the CDN URL at your DNS proxy. Note that Shopify's Help Center explicitly does not recommend or support proxy configurations in front of Shopify, so treat this as an at-your-own-risk fallback. The supported pattern is an App Proxy endpoint (/apps/…/llms.txt) — see Step 2 of our Shopify AEO playbook:

Redirect Rule: /llms.txt -> https://cdn.shopify.com/s/files/.../llms.txt (302)

llms.txt v2: What Changed in August 2026

The proposal at llmstxt.org is not frozen. Jeremy Howard published v2 on August 10, 2026, after two years of real adoption, and it changes three things you should build into your deployment from day one (changelog):

<!-- In your HTML <head> -->
<link rel="alternate" type="text/markdown" href="/docs/quickstart.html.md">
<link rel="describedby" href="/llms.txt">

# Or at the CDN / Worker layer, no page edits needed:
Link: </docs/quickstart.html.md>; rel="alternate"; type="text/markdown", </llms.txt>; rel="describedby"

One nuance from the changelog: the ## Optional section no longer carries mechanical meaning (the old context-expansion tooling was dropped). Keep it as a convention for secondary links, nothing more. And the rule that matters most has not changed: every page you link must be readable without JavaScript, or the agent arrives at another blank wall.

4. WordPress: Plugin-Generated or Physical File

WordPress is the one stack where you no longer have to write the file by hand. Both major SEO plugins now generate and maintain llms.txt for free:

Yoast SEO (free)

Enable the llms.txt feature in Yoast's site-feature settings. It generates the file automatically, refreshes it as content changes, and lets you switch to manual mode to curate the links yourself. It also produces the .md page versions from the v2 spec. Details: yoast.com/features/llms-txt.

Rank Math (free module)

Rank Math SEO → Dashboard → enable the LLMS Txt module, then open General Settings → Edit llms.txt. Choose the post types and taxonomies to include, set the posts/terms limit (default 100), and add custom links under "Additional Content". Posts marked noindex are excluded automatically. Details: rankmath.com/kb/llms-txt.

Running neither plugin? Upload a physical llms.txt to your web root (e.g. public_html/) via FTP or your host's file manager — WordPress serves real root files as-is. Run only one generator at a time so two plugins don't fight over the same URL. If you'd rather start from a template than a blank file, the free llms.txt generator outputs spec-shaped files for SaaS, DTC, agency, and content sites.

Verify the Deployment: 5 Checks Before You Call It Done

  1. Status + MIME. curl -I https://yourdomain.com/llms.txt must return 200 with text/plain (or text/markdown). A 200 that returns your SPA's HTML shell is the soft-404 trap — see why 97% of llms.txt files fail.
  2. Bot's-eye view. curl -A "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot" -s https://yourdomain.com/llms.txt | head -n 5 — the first lines must be your Markdown H1, not a challenge page.
  3. robots.txt clearance. The file is useless if the bots are disallowed. Check with the GPTBot Checker or the 12-bot crawlability audit, and keep the policy consistent with our robots.txt guide.
  4. Lighthouse. Chrome's Lighthouse now ships an llms.txt check inside its experimental Agentic Browsing audits. It flags server errors when fetching the file; a missing file is marked N/A, because publishing one is still optional (docs).
  5. v2 links resolve. If you added .md alternates or Link: headers, fetch one and confirm it returns Markdown, not a redirect to HTML.

Honest Expectations: What 137,000 Server Logs Show

Before you budget engineering time, read the largest log study to date. In June 2026, Ahrefs examined 137,210 domains using its Web Analytics product: 28% published a valid llms.txt, and 97% of those ~38,000 files received zero requests of any kind during May 2026. AI bots never requested llms.txt on domains that didn't have one — publishing a file does not put you on any crawler's radar. Of the requests that did reach existing files, 96% came from bots, but mostly SEO audit tools, tech profilers, and general crawlers; live AI retrieval bots (OAI-SearchBot, PerplexityBot) accounted for just 1.1% (study).

The right conclusion is not "skip it" — it's "price it correctly." An llms.txt is a ten-minute, zero-risk orientation aid for the agents that do look, and documentation platforms and AI labs now publish them routinely. It is not a ranking lever, and no engine has committed to reading it — our myth-busting companion post covers that decision in depth. Spend your real effort on access (robots.txt, WAF) and extractability (server-rendered answers, tables, schema), then add the file as polish. Keep it small and curated: a 400 KB data dump gets dropped by latency-bound retrieval pipelines, which is Trap 3 in our failure audit. For CI/CD-scale generation (Firecrawl, Docusaurus, Next.js route handlers), see the automation guide.

⚠️ Important Caveat: llms.txt Is Not a Magic Bullet

Adding /llms.txt will not fix a website if AI crawlers cannot reach your server in the first place. If your robots.txt file restricts GPTBot or OAI-SearchBot, or if your Cloudflare WAF issues a CAPTCHA challenge, AI engines will never read your file.

Audit Your Entire AI Search Visibility Pipeline

From crawler permissions and JS rendering walls to actual brand citation rates across 12 AI search engines.