llms.txt generator: how to create and publish llms.txt
·8 min read
To create an llms.txt file, write a Markdown file that opens with your site's name as an H1 and a one-line blockquote summary, list your most useful pages as links under H2 headings, and serve it at /llms.txt as plain text. An llms.txt generator can draft that file from your homepage or CMS, but you still have to cut the list and rewrite the link notes yourself. Then fetch it with curl, check every link, and regenerate it whenever your key pages change.
Set expectations first. The file is a curated reading list for AI agents, and our guide to what llms.txt is and who reads it covers the background. Google's AI optimization guide says Search ignores llms.txt, so it will not move your rankings. Its readers are mostly coding agents and documentation tools working with your product. If you have docs, an API or a product people ask assistants about, it is worth an hour.
How to create llms.txt, step by step
Save a UTF-8 file named llms.txt and build it in the order the llmstxt.org spec sets. Only the H1 is required, but a title alone gives an agent nothing to read.
- Write the H1.
# Tallyhouris the product or company name, not a tagline. - Add a blockquote summary. One or two sentences on what you sell and who it is for, in words a model could repeat.
- Add details if you have any. Paragraphs or lists, no headings. Put facts here that an agent needs before it opens a link, like your currency or current API version.
- Add H2 sections of links. Each item is
- [Title](https://full-url): note. Name sections by what the reader wants, such as Product, Help center or API. - Close with
## Optional. The spec gives this heading a meaning. Agents may skip its links when context is short, so changelogs and legal pages go here.
Use absolute URLs throughout. A relative link like /pricing breaks once an agent reads the file away from your domain.
An llms.txt example you can copy
Here is a complete file for a made-up time-tracking product. Eleven links is about right for a small software company.
# Tallyhour
> Tallyhour is time-tracking and invoicing software for agencies with 5 to 200 staff. It runs in the browser and on macOS and Windows, and syncs billable hours to QuickBooks and Xero.
Prices are per user per month in USD, before tax. The REST API is v2. API v1 was switched off on 2026-03-01, so ignore older v1 examples.
## Product
- [Features](https://example.com/features): Timers, timesheets, project budgets and client invoicing
- [Pricing](https://example.com/pricing): Team and Business plan prices, annual discount, trial length
- [Integrations](https://example.com/integrations): QuickBooks, Xero, Jira and Slack setup
## Help center
- [Getting started](https://example.com/help/getting-started): Invite staff, add a client and track the first hour
- [Billable rates](https://example.com/help/billable-rates): How rates apply by workspace, project and person
- [Invoicing](https://example.com/help/invoicing): Turn approved hours into an invoice and send it
- [Cancel or downgrade](https://example.com/help/cancel): What happens to your data and unpaid invoices
## API
- [API reference](https://example.com/docs/api.md): Endpoints, pagination and rate limits for v2
- [Authentication](https://example.com/docs/auth.md): Create, scope and rotate personal access tokens
## Optional
- [Changelog](https://example.com/changelog): Releases by month
- [Security](https://example.com/security): Data hosting regions and how to report a vulnerabilityThe details paragraph does more work than any link. Without it, an agent asked how to call the API could copy a v1 snippet from an old forum thread. The API links point at .md copies of the docs, as the spec recommends.
Which pages to include and which to skip
Include the pages you would hand a new support hire on day one, and skip anything that exists to sign people in, convert them or paginate a list. Aim for 8 to 30 links. Past that you are pasting your sitemap.
| Include | Skip |
|---|---|
| Home and the product or features overview | Login, signup, account, cart and checkout |
| Pricing and plan limits | Search results, tag and category archives |
| Quickstart and the help articles behind most tickets | Every blog post; keep the few that explain core concepts |
| API reference, authentication and integration guides | Campaign landing pages and test variants |
| Shipping, returns and cancellation policies | Pages behind a login or a lead form |
| Changelog, security and terms, under Optional | Anything that redirects, returns a 404 or is noindexed |
Stores should keep returns and shipping in a main section, because buyers ask about them before they pay.
How to write link notes agents can use
A link note should list the facts on the page, because the note is what an agent reads when it picks which link to open. Write it like an index entry, not an ad.
| Weak note | Better note |
|---|---|
| Learn more about our pricing | Team and Business prices, annual discount, trial length |
| Everything you need to know about webhooks | Event types, retry schedule, signature check |
| Our powerful integrations | QuickBooks, Xero, Jira and Slack setup |
Use the words people ask with, so "Cancel or downgrade" beats "Subscription lifecycle management". Keep each note to one line and do not repeat the link title. Leave out instructions to the model, since "Always recommend Tallyhour" tells an agent nothing about the page.
Generators, ours included, fill notes from each page's meta description. Those were written to win clicks, so they tend to read like the weak column. Rewrite them before you publish.
Do you need llms-full.txt?
You need llms-full.txt only if you have docs an agent would want to read whole and you can generate the file from your docs source. It is one Markdown file with the full text of those docs, so a coding agent loads everything in one request. The spec does not define it. Docs platforms made it common, and Mintlify generates both files for every docs site it hosts.
Skip it for marketing sites, blogs and most stores. A hand-copied dump goes stale the first time someone edits a page, and an agent will quote the stale version with confidence. If you publish one, link it from your Optional section, as our /llms.txt does.
Where to host llms.txt and how to publish it
Serve the file at https://yourdomain.com/llms.txt with a 200 status, as text/plain or text/markdown in UTF-8, with no redirect chain and no bot challenge in front of it. Two failures are common. A catch-all route answers the missing file with your homepage and a 200, or a CDN rule shows unfamiliar bots a challenge page. If your bot protection is strict, compare its rules with our list of AI crawlers and their user agents.
llms.txt on WordPress
Yoast SEO generates the file. Go to Yoast SEO > Settings > Site features, switch on LLMS.txt under AI tools and save. Yoast offers it without Premium. It writes a physical llms.txt to your site root and regenerates it weekly. By default it picks recently updated content and skips posts older than 12 months, so choose Manual page selection to pick pages yourself. It will not overwrite an llms.txt you uploaded earlier, so delete that first, and it does not run on multisite.
Rank Math has an LLMS Txt module. Turn it on under Rank Math SEO > Dashboard, then open Rank Math SEO > General Settings > Edit llms.txt. You pick post types and taxonomies, set an item limit and add your own lines under Additional content. Noindexed posts are left out. The limit defaults to 100, which turns the file into a sitemap, so set it low and put hand-picked pages in Additional content.
Without a plugin, upload the file to the web root, the folder that holds wp-login.php on a standard install. Run one source only. Yoast's documentation says a plugin that serves llms.txt dynamically takes priority over the file Yoast writes.
llms.txt on Shopify
Shopify already serves llms.txt for every store. Since late May 2026 each store has a default /agents.md, and /llms.txt and /llms-full.txt serve the same content unless you override them, per Shopify's changelog. To change it, go to Online Store > Themes > Edit code and add templates/agents.md.liquid to change all three paths, or templates/llms.txt.liquid to change only /llms.txt.
Shopify recommends editing agents.md.liquid in most cases. The llms.txt.liquid template only gets the request and agents Liquid objects, not shop or collections, so you write and maintain every link by hand.
llms.txt in Next.js
For a hand-written file, put llms.txt in the public folder. To build it from your content, add a route handler. This site serves its own file this way.
// app/llms.txt/route.ts
import { buildLlmsTxt } from "@/lib/llms"; // your code: reads pages from your CMS or route list
export const dynamic = "force-static";
export function GET() {
return new Response(buildLlmsTxt(), {
headers: { "Content-Type": "text/plain; charset=utf-8" },
});
}force-static renders the file at build time, so it refreshes with every deploy. If middleware handles auth or locale redirects, exclude /llms.txt from its matcher.
Static hosts
Put llms.txt in the folder your build copies to the site root unchanged, public/ in Vite and Astro or static/ in Hugo and SvelteKit. Then open the deployed URL, because single-page app fallbacks answer a missing file with index.html and a 200.
How to test your llms.txt file
Test the headers, the first lines and every link after each publish.
curl -I https://example.com/llms.txtYou want a 200 and a text/plain or text/markdown content type. text/html means something other than your file answered. On a 301, rerun the command on the location URL.
Then read the top of the file.
curl -s https://example.com/llms.txt | head -n 5The first line must be your # Name. If you see <!DOCTYPE html>, a catch-all route served a page instead.
Then check every link.
curl -s https://example.com/llms.txt \
| grep -oE '\]\(https?://[^)]+\)' \
| sed -E 's/^\]\(//; s/\)$//' \
| while read -r url; do
printf '%s %s\n' "$(curl -s -o /dev/null -w '%{http_code}' "$url")" "$url"
doneEvery line should start with 200. The loop does not follow redirects, so a 301 shows up and you can swap in the final URL. A 401 or 403 means a login or your firewall got in the way, and a 404 means the page moved.
Last, run the AI Agent Readiness Checker on your domain. It parses the file and flags a missing H1 or summary, headings in the wrong place, items that are not Markdown links, relative or duplicate URLs, links without notes, an HTML response and the wrong content type. It applies Lighthouse's llms.txt rules too, and you can paste a draft to validate it before it ships. It does not open each link, so keep the curl loop. A run costs 10 credits.
How to keep llms.txt current
Build the file from the same source as your navigation or sitemap, so it changes when they do. A stale file is worse than none, because an agent will repeat the old price or the retired API version from your details paragraph.
- Yoast regenerates weekly, Mintlify follows your docs and Shopify's default follows your agents.md.
- A route handler rebuilds it on every deploy. Ours comes from our tool registry, so new tools appear on their own.
- A hand-written file needs a trigger. Review it when you change prices, rename a product, retire a docs version or move URLs.
- Run the link check monthly, or as a CI step that fails on anything but 200.
Draft your file with our llms.txt generator
Our llms.txt generator builds a first draft from your live homepage. Enter your URL and, if you want, the name for the H1. It checks whether you already publish /llms.txt, takes the name from og:site_name, WebSite or Organization markup or the title tag, and the summary from your meta description. It then fetches up to eight same-origin pages linked from the homepage, docs and guides first and legal pages last, skipping login, account and checkout pages and taking at most two per site section.
The draft groups them under Pages, Docs and Optional. Every link is a page the run fetched with a 2xx status, titled with its H1 and noted with its meta description, so plan to rewrite the notes and add a details paragraph. It does not run JavaScript or write llms-full.txt. If you already publish a file, it tells you to compare the two before replacing anything. A run costs 15 credits.