How to Generate & Automate llms.txt (2026): Free Generators, Next.js & CLI Guide

Compare free online llms.txt generators, WordPress & Shopify setups, and build-time Next.js automation. Generate a compliant /llms.txt and /llms-full.md in minutes with open-geo CLI.

A
Agent WangGEO Researcher & Technical Engineer
•16 min read
💡 Key Takeaway:

Before pasting your domain into a one-click web generator and forgetting about it, establish these three engineering realities about generating /llms.txt in 2026:

  • One-Shot Generators Drift Immediately: Good for a 60-second first draft, static forever after. Ship a pricing page, rename a doc route, publish a post — the pasted file goes stale. Bind generation to your build pipeline or CMS hook.
  • Match the Generator to Your Stack: Mintlify and GitBook generate it natively. Yoast SEO ships it in the free WordPress plugin; Rank Math has an LLMS Txt module. Shopify already manages /llms.txt (mirroring /agents.md). Next.js needs a prebuild script or a static Route Handler.
  • Generation Is Half the Job: llmstxt.org is a community proposal, not a ranking switch — though Lighthouse now audits it for agentic browsing. Before shipping: HTTP 200, non-HTML Content-Type, absolute URLs, lean index (our threshold: under 50KB; the spec sets none).

Fastest path — existing live site, no code changes:

npx open-geo generate-llms https://yourdomain.com -o ./public/llms.txt

On Next.js? Jump straight to §2 (three production patterns). On WordPress or Shopify? §1 covers what your platform already does for you — in most cases, nothing is required.

⚡ Already generated an /llms.txt? Verify your live endpoint or raw Markdown with our free llms.txt Validator & Syntax Checker — instant checks for Soft-404 HTML shells, Content-Type drift, relative links, and structural compliance.

Validate My llms.txt →

If you search for an llms.txt generator today, you will find dozens of free web forms promising to make your site "AI-ready" in one click.

Most of them work the same way: you type in https://yourdomain.com, wait 20 seconds while a crawler scrapes your sitemap, download a text file, and drop it into your root directory.

Two weeks later, you launch a new feature, change your pricing tier, and publish three technical guides. Your /llms.txt still points to last month's site structure—or worse, includes dead URLs and /privacy boilerplate that the scraper blindly pulled from your footer.

This guide compares the real ways to generate /llms.txt across free online tools, WordPress, Shopify, documentation frameworks, Next.js App Router, and open-source CLI, so you can choose a workflow that stays in sync with your codebase instead of rotting in public/.


§0 Two Architectures: One-Shot Scrapers vs. Build-Time Automation

Every llms.txt generator falls into one of two architectural categories:

[1. External scrape]  live site → third-party crawler → download → upload   → drifts on next deploy
[2. Source-driven]    MDX / CMS / DB → build script → /llms.txt + /llms-full  → synced every deploy
  • External Scrapers (online llms.txt generator web tools, crawling APIs, or CLI crawlers) inspect your site from the outside. They are ideal for bootstrapping an initial draft or auditing a legacy site whose source code you do not control.
  • Source-Driven Pipelines (Next.js prebuild scripts, CMS plugins, or native doc platforms) read directly from your frontmatter, database, or navigation tree. They never miss a newly published page and never accidentally index utility routes like /login or /cart.

If you are unsure what a valid llms.txt file must contain structurally (H1 title, blockquote summary, H2 sections, and - [Title](URL): Description link tuples), review our foundational breakdown first: llms.txt Standard Explained.

What Changed in llms.txt v2 (2026)

The updated llmstxt.org specification (modified August 2026) introduced three practical shifts that directly shape how you should design your generator pipeline:

  • Sub-path manifests are officially supported: You no longer need to cram an entire multi-product domain into a single root file. A file placed at /docs/llms.txt covers only the pages under /docs/, allowing large SaaS sites to partition manifests cleanly by product line.
  • Per-page .md variants and HTTP discovery headers: Beyond the root index, v2 proposes serving a clean Markdown twin for key pages (e.g., page.html.md or page.md) and advertising it via rel="alternate" type="text/markdown", alongside rel="describedby" pointing back to the covering llms.txt. Because these can be injected via CDN or web server headers, you do not have to pollute your HTML templates.
  • Browser toolchain and AI lab adoption: Chrome's Lighthouse now audits for llms.txt as part of its agentic browsing checks, and the frontier labs themselves—OpenAI, Anthropic, and Gemini—publish llms.txt manifests for their own developer documentation. Even without a guaranteed search ranking boost, the convention has become standard developer-experience infrastructure.

§1 Comparing llms.txt Generator Paths by Tech Stack (2026)

Before writing custom scripts, check whether your existing platform already handles generation natively. (Tool capabilities and free-tier terms verified against official documentation as of November 2026.)

Approach / ToolCost & GateAuto-Sync on UpdateGenerates llms-fullBest FitKey Limitation
Docs Platforms (Mintlify, GitBook, Fumadocs)Included in platform / OSS✅ Automatic✅ Yes (/llms-full.txt)SaaS documentation hubsOnly covers your docs subdomain, not your marketing site
WordPress Core SEO Plugins (Yoast SEO, Rank Math)Yoast: Free; Rank Math: tier unstated in docs✅ AutomaticVaries by plugin configWordPress blogs & content sitesRewrite/permalink cache conflicts can cause 404s if misconfigured
Shopify Native / Theme Template (templates/llms.txt.liquid)Free (native managed default)✅ Managed default; manual in custom Liquid✅ Mirrors /agents.md by defaultShopify storefrontsManaged default mirrors /agents.md; customizing it means owning a restricted Liquid template
Writesonic Free llms.txt GeneratorFree (no login, 3 files/day)❌ Manual re-run❌ Index onlyQuick one-off draft for small static sitesStatic snapshot; drifts whenever pages change
Firecrawl (API / Crawler)Free tier: 1,000 credits/mo (1 credit = 1 page)⚠️ Via scheduled CI/cron✅ Programmatic MarkdownLarge/legacy sites needing automated external scrapingDedicated /llmstxt endpoint deprecated Dec 10, 2026; use /v2/map + /v2/batch/scrape
open-geo CLI / Chrome ExtensionFree & MIT Open-Source✅ Via CI script or local CLI✅ Yes (--full → llms-full.md)Developers, agencies, & multi-stack reposRequires Node.js (npx) or Chrome extension

1. Documentation Frameworks (Check Here First)

If your product docs run on a modern documentation platform, do not build a custom generator from scratch:

  • Mintlify: Automatically generates and hosts /llms.txt, /llms-full.txt, and per-page .md variants out of the box based on your navigation tree and frontmatter. Mintlify also mirrors the manifest at /.well-known/llms.txt and attaches rel="alternate"; type="text/markdown" headers across responses (including 404s).
  • GitBook: Natively serves /llms.txt and /llms-full.txt alongside Markdown exports and an auto-generated MCP server endpoint (/~gitbook/mcp) for every published space. Operational caveat: per GitBook's docs, llms-full.txt includes hidden pages (hiding only removes them from sidebar navigation, not from the full corpus)—never use hidden pages to stage confidential or unreleased announcements.
  • Fumadocs (Next.js / React docs): Provides official CLI scaffolding (npx @fumadocs/cli feature llms), which injects docsLlms into lib/source.ts and wires up both /llms.txt and /llms-full.txt route handlers (note that includeProcessedMarkdown must be enabled to serve processed Markdown).

2. WordPress: Skip Random Single-Purpose Plugins

A common search query is "wordpress plugin llms.txt generator", which has spawned dozens of unmaintained single-purpose plugins.

As of late 2026, you rarely need an extra plugin. Yoast SEO ships llms.txt generation in the free plugin—Yoast's own feature page states it is "free for everyone … no upgrade needed"—with automatic and manual curation modes inside plugin settings. Rank Math SEO also provides an LLMS Txt module you can toggle on directly from the Rank Math Dashboard; Rank Math's official KB does not specify which pricing tier it belongs to, so verify on your own install before planning around it.

Watch out for WordPress permalink 404s: If you enable the module and /llms.txt still returns a 404, flush your permalinks (Settings → Permalinks → Save) and check your Nginx/Apache rewrite rules. See our llms.txt Debugging Runbook for exact server fixes.

3. Shopify: Native /llms.txt Hosting & the Restricted Liquid Context

Shopify does not expose a root filesystem (yourstore.com/llms.txt), and Shopify App Proxies require a path prefix (such as /apps/subpath). However, Shopify now natively manages /llms.txt for every store by mirroring /agents.md (the canonical agent-discovery file). For most merchants, you already have a live /llms.txt without touching code—you only need to intervene if you want /llms.txt to diverge from /agents.md.

Historically, many guides recommended uploading llms.txt to Shopify Files (cdn.shopify.com/...) and creating a URL redirect from /llms.txt. That workaround is now broken: once Shopify began serving /llms.txt natively, custom URL redirects on that path are silently overridden by the platform, and cross-host redirects to cdn.shopify.com already caused strict fetchers to drop headers.

The supported Shopify override is a theme template — but know exactly what the template can see. templates/llms.txt.liquid renders at /llms.txt, yet it runs in a restricted Liquid context: only the request and agents objects are injected. Standard global objects (shop, products, collections, articles) are not available, so you cannot loop over your product catalog from inside this file.

  1. In Shopify Admin, go to Online Store → Themes → ... → Edit code.
  2. Under Templates, create a new file named llms.txt.liquid (and optionally llms-full.txt.liquid). It must be a .liquid template, not JSON.
  3. Write the manifest explicitly—brand summary, policies, support, and key landing pages—or pull store metadata from the agents object. Catalog-wide automation must come from a URL list you own (such as a product CSV or an external build step), not from Liquid loops.

See the Shopify llms.txt.liquid template reference for the exact object surface.

4. Free Online Generators (Writesonic, Firecrawl & Similar Tools)

If you run a small brochure site or want a fast structural baseline without opening a terminal:

  • Writesonic's Free llms.txt Generator runs in the browser with no login or email wall (the official page states "no login, no email, 3 free files a day" with no truncated preview), scanning your robots.txt and sitemap to filter out utility pages and emit a spec-compliant draft.
  • Firecrawl is a developer-oriented crawling API (1,000 free credits/month at 1 credit per page) suited for teams that want to schedule external scrapes of legacy CMS platforms where source files are inaccessible. Important heads-up for pipelines: Firecrawl used to expose a dedicated /llmstxt generation endpoint, but Firecrawl's documentation marks it deprecated and scheduled for removal on December 10, 2026, redirecting developers to /v2/map + /v2/batch/scrape instead. Pin any automated workflow to those generic crawl endpoints so your script does not break after the cutoff.

Both are useful starting points, but neither replaces source-driven automation if your engineering team deploys weekly.


§2 Next.js App Router: 3 Production Patterns for /llms.txt

If your marketing site, SaaS app, or docs run on Next.js App Router, you have three clean ways to generate and serve /llms.txt.

Pattern 1: Static File in public/llms.txt

Place a hand-authored file at public/llms.txt. Next.js serves it at https://yourdomain.com/llms.txt with Content-Type: text/plain and zero serverless compute cost.

  • Use this when: Your site has fewer than 10 core pages and rarely changes URLs.
  • Skip this when: You publish blog posts, changelogs, or docs regularly (it will drift).

Pattern 2: Static Route Handler (app/llms.txt/route.ts)

If you want explicit text/markdown; charset=utf-8 headers and programmatic assembly inside Next.js, create a Route Handler forced to static generation at build time:

// src/app/llms.txt/route.ts
export const dynamic = 'force-static'   // built once, zero runtime fs

const LLMS = `# Acme DevTools

> Deterministic CI/CD caching and distributed test runner for TypeScript monorepos.

## Documentation

- [Quick Start](https://acme.dev/docs/quickstart): Remote caching in under 5 minutes.
- [Pricing](https://acme.dev/pricing): Free OSS tier, Pro ($19/seat), Enterprise SLA.

## Optional

- [Full Corpus](https://acme.dev/llms-full.txt): Single-file Markdown for long-context models.
`

export function GET() {
  return new Response(LLMS, {
    headers: {
      'Content-Type': 'text/markdown; charset=utf-8',
      'Cache-Control': 'public, max-age=3600, s-maxage=86400',
    },
  })
}

Edge Runtime / Cloudflare Workers Warning: If you deploy Next.js to Cloudflare Workers (e.g., via @opennextjs/cloudflare) or Vercel Edge, do not call fs.readFileSync() inside GET(). Edge runtimes do not expose a local filesystem at request time. Either export dynamic = 'force-static' or generate a TypeScript constant at build time (Pattern 3 below).

Pattern 3: Idempotent prebuild Script (Our Production Setup at geofn.com)

For content-heavy Next.js sites (MDX blogs, docs, changelogs), the cleanest architecture is a build-time script that reads your frontmatter and emits both public/llms.txt and public/llms-full.txt before next build runs.

Below is a simplified version of the exact script (scripts/build-llms-txt.mjs) that powers geofn.com on every deploy:

// scripts/build-llms-txt.mjs
import fs from 'node:fs'
import matter from 'gray-matter'

const SITE_URL = 'https://yourdomain.com'

// 1. Frontmatter → { title, description, date, slug }, newest first
const posts = fs.readdirSync('content/blog')
  .filter((f) => f.endsWith('.mdx'))
  .map((f) => ({ ...matter(fs.readFileSync(`content/blog/${f}`, 'utf8')).data,
                 slug: f.replace(/\.mdx$/, '').replace(/^\d{4}-\d{2}-\d{2}-/, '') }))
  .filter((p) => p.title && p.description && p.date)
  .sort((a, b) => new Date(b.date) - new Date(a.date))

// 2. The one section you cannot hand-write: absolute link tuples
const links = posts
  .map((p) => `- [${p.title}](${SITE_URL}/blog/${p.slug}): ${p.description}`)
  .join('\n')

// 3. Reuse the Pattern 2 skeleton — only the generated section changes
fs.writeFileSync('public/llms.txt', `# Your Brand\n\n> One-sentence factual summary.\n\n## Articles\n\n${links}\n\n## Optional\n\n- [Full KB](${SITE_URL}/llms-full.txt): Single-file corpus.\n`, 'utf8')

Wire it into package.json so it runs before every build — and before dev, otherwise new articles only appear in llms.txt after a restart:

"scripts": {
  "prepare-data": "node scripts/build-llms-txt.mjs",
  "prebuild": "pnpm run prepare-data",
  "dev": "pnpm run prepare-data && next dev"
}

Why this pattern beats manual generators:

  1. Zero drift: Every time you merge a new MDX article, CI regenerates public/llms.txt automatically.
  2. Absolute canonical URLs by construction: No relative /blog/... links can sneak in.
  3. Edge-compatible: Because the file lands in public/ (and can optionally emit a typed src/lib/generated-llms.ts constant for Workers), there is zero runtime disk I/O.

§3 Generate /llms.txt for Any Site in 60 Seconds with open-geo CLI

Not running Next.js, or need to bootstrap an llms.txt from an existing live site without uploading data to a third-party SaaS?

Use the MIT-licensed open-geo CLI directly from your terminal:

# 1. Crawl your live site and generate ./public/llms.txt
npx open-geo generate-llms https://yourdomain.com -o ./public/llms.txt

# 2. Generate BOTH /llms.txt and the full corpus /llms-full.md
npx open-geo generate-llms https://yourdomain.com -o ./public/llms.txt --full -f

What the CLI does under the hood (verified against open-geo CLI source):

  • Crawls your site structure and extracts core page titles and descriptions into the standard llmstxt.org hierarchy.
  • Uses atomic file writes (safeAtomicWrite) and refuses to clobber an existing file unless you explicitly pass -f / --force.
  • When --full is passed, it writes a companion llms-full.md file alongside your index for long-context LLM ingestion.

Prefer a browser workflow without opening a terminal? The OpenGEO Chrome Extension inspects the active page inside Chrome's Side Panel and generates ready-to-paste llms.txt, robots.txt, and Schema.org fixes locally in one click.


§4 Pre-Deployment Verification: 6 Checks Before You Ship

Generating the file is only half the workflow. In our earlier audit of broken production llms.txt endpoints, infrastructure mistakes (Soft-404 HTML shells, robots.txt blocks, and WAF challenges) caused more failures than Markdown syntax bugs.

Run these six checks before calling your deployment done:

  1. Verify raw HTTP status and Content-Type from the terminal — this is the check no one can argue with:
    curl -sI -L https://yourdomain.com/llms.txt | grep -iE "HTTP/|content-type"
    
    Confirm HTTP/2 200 and either text/markdown or text/plain—never text/html.
  2. Then run an automated syntax & Soft-404 scan: Once the endpoint is serving real Markdown, paste your live URL into our free llms.txt Validator to catch H1/blockquote/H2 structure issues, relative links, and HTML shells in one pass.
  3. Check for relative Markdown links: Every link in llms.txt must be an absolute https:// URL. Relative paths like [Pricing](/pricing) break when an agent ingests the file outside a browser context.
  4. Keep the index lean — aim for well under 50KB: The llmstxt.org proposal only asks that the file "stays small enough to fit in context" and sets no numeric limit; 50KB is our own working threshold. Move full prose, API specs, and long tutorials into /llms-full.txt or /llms-full.md.
  5. Confirm AI crawlers are not blocked: a perfect llms.txt is invisible if robots.txt still disallows GPTBot, OAI-SearchBot, ClaudeBot, or PerplexityBot — see our AI Crawlers Whitelist guide.
  6. Expose per-page .md twins (v2 best practice): serve a Markdown twin for high-value docs and pricing pages, advertised via rel="alternate" type="text/markdown" and rel="describedby" — agents landing on one page can then find the manifest.

Frequently Asked Questions

Is /llms.txt the same as /agents.md?

Not by definition, but on some platforms they are the exact same document. Shopify generates a canonical /agents.md per store (agent capabilities, UCP/MCP endpoints, policies, and read-only browsing URLs) and serves /llms.txt and /llms-full.txt as mirrors of it. When a platform supports both, treat the richer file as canonical and make sure the other mirrors or points to it rather than duplicating content — two files that drift apart are worse than one.

Should I name the full corpus file llms-full.txt or llms-full.md?

Both conventions are widely accepted across the community. .md provides native Markdown syntax highlighting in code editors and GitHub (which is why open-geo generate-llms --full emits llms-full.md), whereas .txt guarantees that almost every static file host and CDN serves text/plain without custom MIME rules. Pick one, link to it explicitly under ## Optional inside /llms.txt, and verify the response header returns plain text or Markdown.

Does generating an llms.txt guarantee better rankings in ChatGPT or Google AI Overviews?

No. As documented in our llms.txt Debugging Runbook, no major frontier lab guarantees ranking boosts solely because an llms.txt file exists. Its practical engineering value is eliminating HTML/JavaScript parsing noise so IDE agents, coding assistants, and retrieval crawlers can accurately read your documentation, pricing, and architecture without hallucinating outdated facts.

How often should I regenerate my llms.txt?

If you use a build-time script (Next.js prebuild), a CMS plugin (Yoast / Rank Math), or a Shopify .liquid template, regeneration happens automatically on every publish. If you rely on an external scraper or manual CLI run, regenerate whenever you launch a major product page, change pricing tiers, or restructure documentation URLs.


Related Articles