// Technical Tutorial · 6 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 wastes 70–90% of the LLM’s context window on navigational boilerplate.

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 pure Markdown content without hallucination.

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. The standard workaround is to upload llms.txt to Settings > Files and configure a CDN redirect in Cloudflare or your DNS proxy:

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

⚠️ 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.