How to Create an llms.txt File for Your Website: WordPress, Shopify, Next.js
How to create an llms.txt file: the four blocks the spec requires, a template you can copy and the exact settings path on WordPress, Shopify, Next.js, Wix and more.
Quick answer
Under the method in this guide, Canlah AI creates an llms.txt file by writing four Markdown blocks and publishing them at the domain root as /llms.txt: an H1, a blockquote summary, H2 link sections and a final Optional section. Creating one is a writing job, not an engineering job: drafting takes about 30 minutes, and publishing takes between two and 15 minutes on six of the seven platforms reviewed on September 23, 2026. Shopify is the exception, because it serves its own file at that path.
Canlah AI publishes its own file at canlah.ai/llms.txt. On September 23, 2026 it was 113 lines and 15,953 bytes, served as text/plain, with 8 H2 sections and an Optional block at the end.
Treat publication as plumbing, not performance. The file blocks nothing and ranks nothing, and its use as a recommendation input was not found in the public documentation of the major answer engines reviewed. Publish it because agents that read it get a cleaner map, then measure answers separately before crediting the file with anything.
Disclosure: Canlah AI publishes this guide, operates canlah.ai/llms.txt and sells the SEO + GEO work described below. Platform behaviour was checked against live sites and public documentation on September 23, 2026. Plugin install counts are the rounded figures WordPress.org publishes, not audited numbers.
What an llms.txt file must contain
The llms.txt proposal, last modified August 10, 2026, defines four blocks, and only the first two are mandatory. The format is deliberately parseable, so an agent can split it with a regular expression rather than a language model.
- H1: one line naming the site, the company or the project. This is the only required heading.
- Blockquote summary: a short paragraph after the H1, marked with
>, describing what the site is and who it serves. Write the sentence you want an assistant to repeat about the business. - H2 link sections: any number of headings, each followed by a bullet list of links in the form
- [Title](url): notes. Group them the way a reader would ask: key pages, services, pricing, documentation. - Optional section: an H2 named exactly
Optional. Links under it may be skipped by an agent that is short of context, so put secondary material here rather than deleting it. - Markdown page copies: v2 also proposes a
.mdcopy of each linked page, pointed to byrel="alternate". Treat this as a later step; a marketing site gains more from getting the first four blocks right.
A working template, short enough to copy:
# Acme Industrial
> Acme Industrial is a Singapore-based manufacturer of food-grade conveyor systems,
> serving processing plants across Southeast Asia since 2009.
## Key pages
- [Home](https://acme.example/): What Acme makes, for whom, and where it operates.
- [Products](https://acme.example/products/): The five conveyor lines with load ratings.
- [Pricing](https://acme.example/pricing/): Indicative ranges and lead times.
- [Contact](https://acme.example/contact/): Sales contacts by market.
## Company facts
- [About](https://acme.example/about/): Founding date, headcount, certifications.
- [Case studies](https://acme.example/cases/): Named installations with dates.
## Optional
- [Blog](https://acme.example/blog/): Engineering notes, updated weekly.
- [Careers](https://acme.example/careers/): Open roles.
Keep the file under roughly 20 KB. The point of llms.txt is that it fits inside an agent’s context in one fetch, so a link dump of 4,000 URLs defeats the format.
Where each platform puts the file
Six of the seven setups below expose llms.txt without touching a server, and Shopify is the single exception that takes the path away from the merchant. The table records what each platform published or served when Canlah AI checked it on September 23, 2026.
Where llms.txt is created on seven common stacks, reviewed September 23, 2026.
| Platform | Native llms.txt setting | Where you create or edit it | Typical time to publish | Main point to verify |
|---|---|---|---|---|
| WordPress | Through an SEO plugin; core setting not found on reviewed pages | Rank Math, Yoast SEO, All in One SEO or Website LLMs.txt | 10 minutes | Only one plugin may own the route |
| Shopify | Merchant-editable setting not found on reviewed pages | Platform serves its own agent file at that path | Not available | What your store already returns at /llms.txt |
| Next.js | Built-in convention not found on reviewed pages | public/llms.txt, or an App Router handler at app/llms.txt/route.ts |
15 minutes | Response Content-Type must not be HTML |
| Webflow | Yes, since July 23, 2025 | Site settings, then SEO, then LLMs.txt, then Upload file | 5 minutes | Webflow hosts the upload, so every line is yours to draft |
| Wix | Yes, generated automatically | Dashboard, then SEO and GEO, then Tools and settings | 2 minutes | Editing stops automatic updates until you reset |
| Squarespace | Yes, on version 7.1 only | Website, then SEO/AI Visibility, then SEO Settings, then LLMS.txt | 5 minutes | Version 7.0 sites still need a redirect workaround |
| Astro and other SSGs | Convention not found on reviewed pages; a static file works | A file in the static asset directory, for example public/llms.txt |
5 minutes | The build must copy it to the deployed root |
Source: vendor documentation and live responses checked September 23, 2026. “Not found on reviewed pages” means the capability was not named in the public materials examined that day, not proof that it is absent.
How to add llms.txt in WordPress
WordPress needs no file upload, because four maintained plugins already generate it: Yoast SEO at 10 million active installs, Rank Math at 4 million, All in One SEO at 2 million and the single-purpose Website LLMs.txt plugin at 40,000, read from the WordPress.org plugin API on September 23, 2026. Pick the one you already run.
- Open
https://yourdomain.com/llms.txtin a private window before installing anything. If a plugin, a host or a security suite already answers that path, a second generator creates a slow-to-diagnose conflict. - In Rank Math, go to Rank Math SEO, then Dashboard, then toggle on the LLMS Txt module. Its settings sit at Rank Math SEO, then General Settings, then Edit llms.txt. The file stays empty until you configure it.
- Choose post types and taxonomies deliberately. Rank Math lists each item by title, URL and intro text, caps the list at 100 by default and excludes anything set to noindex. For a services business, pages alone beat pages plus every post.
- In Yoast SEO, the file is generated in one click, free in the core plugin, with an automatic and a manual mode. Preview before publishing, then switch to manual if the automatic selection favours thin archive pages.
- Write the summary by hand. Every plugin fills the H1 and the link lists, while the blockquote describing your business the way you want it repeated is the part to write yourself. Rank Math exposes it through its Additional Content field.
- Reload the live URL and confirm the change appears, because caching plugins and CDNs routinely serve a stale copy for hours.
One plugin should own the route and the rest should stay off it. Drop a static llms.txt into the WordPress root as well and the web server answers first, hiding the plugin output while the admin screen still reports it as live.
Best for: sites already running Rank Math, Yoast SEO or All in One SEO.
What to verify: that exactly one plugin or static file answers /llms.txt.
Public source: Rank Math llms.txt guide
How to add llms.txt in Shopify
Shopify served its own llms.txt on both storefronts Canlah AI checked on September 23, 2026, which gives a merchant an agent-facing file without drafting one; a merchant-editable setting for that path was not found on reviewed pages. The two storefronts, allbirds.com and colourpop.com, both returned a document titled “Agent Instructions”, served as text/markdown; charset=utf-8, covering the Shop skill, the Universal Commerce Protocol endpoints, read-only browsing and store policies.
The Allbirds file states the arrangement in its own words: “Agent discovery: the canonical agent-facing description of the store is at /agents.md. You’re reading /llms.txt, which mirrors that content.” The two responses differed by exactly one line when Canlah AI compared them that day. Merchants who previously served a custom file through a theme template, a redirect or an app report that the platform response overrides it.
That leaves three moves, in order of value:
- Read what your store already serves at
/llms.txtand/agents.md, and check the generated description of your catalogue, policies and shipping. An inaccurate platform file is a bigger problem than a missing custom one. - Move the facts an agent needs into surfaces you control: Product, Organization and FAQPage JSON-LD, a crawlable facts page and product copy stating materials, sizes and lead times in text.
- Serve your own file from a host you own, such as a documentation subdomain, and link to it from pages agents reach.
Best for: merchants who want an agent file without maintaining one and accept Shopify’s wording of it.
What to verify: what your own storefront returns at both paths, because this behaviour changed twice during 2026.
Public source: Shopify Community thread on /llms.txt
How to add llms.txt in Next.js
Next.js publishes an llms.txt file through one of two patterns, a static file in public/ or an App Router route handler, and the choice depends on whether the file is hand-written or generated. Next.js documents file conventions for sitemap.js and robots.js, an llms.txt convention was not found on reviewed pages and a request for one was still open in the Next.js discussions on September 23, 2026.
Static file. Put the finished Markdown at public/llms.txt. Next.js copies the directory to the deployed root and nothing breaks at runtime. This is the right default for a marketing site with 10 to 40 curated links. Canlah AI runs Astro rather than Next.js and uses the same pattern, shipping public/llms.txt at 15,953 bytes.
Route handler. When the link list comes from a CMS or an MDX directory, generate it at build time:
// app/llms.txt/route.ts
import { getPublishedPages } from "@/lib/content";
export const dynamic = "force-static";
export async function GET() {
const pages = await getPublishedPages();
const body = [
"# Acme Industrial",
"",
"> Acme Industrial is a Singapore-based manufacturer of food-grade conveyor systems.",
"",
"## Key pages",
...pages.map((p) => `- [${p.title}](${p.url}): ${p.summary}`),
].join("\n");
return new Response(body, {
headers: { "Content-Type": "text/plain; charset=utf-8" },
});
}
Two details decide whether this works. Set dynamic = "force-static" so the file renders once at build time rather than on every agent request, and set the Content-Type explicitly, because a handler returning a bare string can be served as HTML and some clients refuse to parse it.
Best for: teams that deploy through Git and want the file reviewed with the rest of the site.
What to verify: a text/plain or text/markdown content type on the deployed URL.
Public source: Next.js discussion 80692
How to add llms.txt in Webflow, Wix and Squarespace
Webflow, Wix and Squarespace each expose llms.txt in site settings, with publishing times of five, two and five minutes in the table above, which makes the asset-manager and redirect workarounds circulated during 2025 unnecessary everywhere except Squarespace 7.0. Each behaves differently once the file is live.
Webflow accepts an upload. Go to Site settings, then SEO, then LLMs.txt, then Upload file. The feature launched on July 23, 2025, and Webflow states that it serves the file at the domain root while keeping it out of search indexes. Webflow’s announcement describes an upload rather than a generator, so the drafting work above still applies.
Best for: teams that want full control of every line.
What to verify: a 200 status at the root after the site is republished.
Public source: Webflow llms.txt announcement
Wix generates the file for you. Go to the site dashboard, then SEO and GEO, then Tools and settings, then Go to llms.txt. The prerequisites are a premium plan, a connected custom domain and search indexing switched on. Wix maintains the file automatically until you edit it by hand, at which point updates stop so your changes survive. Reset to Default restores maintenance, a toggle opts the site out and Wix states the file exposes only content already public on the site.
Best for: small sites that want a maintained file with no drafting.
What to verify: whether a hand edit has switched off automatic updates.
Public source: Wix llms.txt help article
Squarespace added a native editor for version 7.1 sites in July 2026. Go to Website, then SEO/AI Visibility, then SEO Settings, then LLMS.txt, and paste the file in. Version 7.0 sites still need the older method: upload through the asset manager, then add a URL mapping redirecting /llms.txt to the asset URL.
Best for: version 7.1 sites with a finished file to paste in.
What to verify: the site version before choosing a method.
Public source: Squarespace Forum llms.txt thread
How to verify the file is live
Verifying an llms.txt file takes six checks and about two minutes, and the most common failure they catch is a file that looks correct in a CMS preview while production returns a 404 page.
- Run
curl -I https://yourdomain.com/llms.txtand confirm the status is 200 rather than 301, 403 or 404. - Read the
content-typeheader. It should betext/plainortext/markdown. Atext/htmlresponse almost always means a soft 404 page is being served with a 200 status. - Fetch the file from outside your network and without cookies, because an editor session or an office IP allowlist can make a staging-only file look live.
- Compare the H1 and blockquote against the homepage and your Organization schema. When the two disagree, an agent picks one and you do not control which.
- Open three links from the file. Redirect chains, staging hostnames and deleted pages are the usual contents of a generated list nobody has reread.
- Record the date, the byte size and the line count, which is the baseline Canlah AI uses for the next check and the evidence that the file was live on a given day.
How to interpret four common results
An llms.txt check ends in one of four results: a 404, an HTML page served with a 200 status, a file the platform wrote or a clean file that changes nothing in AI answers.
Nothing at the root. The path returns 404. Check whether an SEO plugin or a build step is supposed to produce the file; on a static site the cause is usually a build that skips the asset directory.
A 200 status with an HTML body. A catch-all page is being served in place of the file. Look for a rewrite rule, a single-page application fallback or a CDN page rule that routes unknown paths to the application. Fix it before rewriting a line of content.
A 200 status with content you did not write. The platform owns the path, as Shopify does. Audit the generated text for factual errors, correct them at their source and move the rest of the effort to structured data and on-page evidence.
Live, clean, correct and followed by nothing. This is the normal outcome. Canlah AI has served an llms.txt since at least August 2026, and on September 7, 2026 its own audit still scored the site 4 out of 100 on the GEO dimension and 71 out of 100 overall, with the brand named in 7 of 177 non-branded grounded answers across 39 buyer questions run three times each on ChatGPT and Gemini. The map was fine. The evidence the engines needed was not.
What publishing llms.txt cannot do
Publishing llms.txt has five limits a buyer should price in, and each follows from the file being a map rather than a ranking signal.
- It cannot make an engine cite the brand, because the file describes where to read, not who to recommend.
- It cannot block an AI crawler. That is robots.txt, and llms.txt has no directives.
- It cannot fix a description that contradicts the homepage, the About page or the Organization schema.
- It cannot prove causation. An answer that improves the week after publication may reflect a model update, a competitor’s change or a differently phrased question.
- It cannot substitute for a measurement baseline, because without one there is no way to tell whether anything moved.
Canlah AI has a gap of its own here: canlah.ai/llms-full.txt returned 404 on September 23, 2026, so the full-text companion file described in the proposal is an intention rather than an artifact.
When to move from publishing the file to measuring answers
Publishing an llms.txt file is finished work within an hour, while measuring whether AI answers change is a separate project justified by four conditions. Measurement is worth paying for when AI-assisted research touches a real buying decision, when the brand sells across more than one language or market, when an inaccurate answer would create commercial or regulatory risk or when several teams publish facts that have to stay consistent.
Canlah AI is a Singapore-based SEO + GEO agency that measures and improves brand visibility inside ChatGPT, Gemini, Google AI Overviews and Google AI Mode, reporting AI visibility as re-verifiable ranges with timestamped evidence. It is a poor fit for a site whose only problem is a missing root file, which is under an hour of work you should do yourself rather than buy.
Do not treat this guide as the last check. Settings paths, plugin counts and platform responses were read on September 23, 2026. Shopify’s behaviour changed twice during 2026 and Squarespace added its editor in July 2026, so fetch your own /llms.txt, run the six checks above and record the date before calling the file done.
Frequently asked questions
Does a sitemap.xml file replace an llms.txt file?
No. The two files serve different readers and neither replaces the other. A sitemap.xml file lists every indexable URL for search crawlers, while llms.txt hands an agent a short curated map with a written summary. Canlah AI publishes both and treats neither as a ranking input.
How do I add llms.txt in WordPress without a plugin?
Write the file locally and upload it to the WordPress root directory, next to wp-config.php, over SFTP or your host’s file manager. The web server serves it before WordPress handles the request. The trade-off is that the links go stale, because nothing regenerates them when you publish or unpublish a page.
Can I add an llms.txt file to a Shopify store?
Not at the standard path in 2026. Both Shopify storefronts Canlah AI checked on September 23, 2026 returned Shopify’s own Agent Instructions document at /llms.txt, mirroring /agents.md. Audit that generated file for accuracy, then invest in structured data and product copy. Re-check your own storefront, because the behaviour changed twice during 2026.
How do I create an llms.txt file from a template?
Copy the Acme Industrial template in this guide, which already carries the H1, the blockquote summary, two H2 link sections and the Optional block the proposal describes. Replace the links with 10 to 40 of your own key pages, rewrite the blockquote in the words you want an assistant to repeat about your business and publish the file at /llms.txt. Copying a competitor’s file wholesale is the version that reliably backfires.
How long should an llms.txt file be?
Short enough to load in a single fetch, which in practice means under about 20 KB and rarely more than 60 links. The Canlah AI file was 113 lines and 15,953 bytes on September 23, 2026. A generated list of every post on a large site works against the purpose of the format.
Will publishing llms.txt get my brand cited by ChatGPT?
There is no public evidence that it will. llms.txt as a citation input was not found in the public documentation of ChatGPT or the other answer engines reviewed, and the Canlah AI site scored 4 out of 100 on the GEO dimension of its September 7, 2026 audit while serving a complete file. Publish it for agent hygiene, then measure answers to find out what needs fixing.
Method and sources
Canlah AI built this guide from the llms.txt proposal, the public documentation of six website platforms and live responses fetched on September 23, 2026. Root-file behaviour was checked with direct HTTP requests from one location that day, and plugin install counts are the rounded figures the WordPress.org API returns. Settings paths come from vendor help pages and were not re-tested inside every plan tier.
- llmstxt.org, “The /llms.txt file, v2”, Jeremy Howard. The four blocks, the Optional section and the Markdown-version proposal; modified August 10, 2026.
- Rank Math, “How to Use llms.txt in Rank Math SEO”. Module path, 100-item default limit, noindex exclusion.
- Yoast SEO llms.txt feature page. One-click generation, automatic versus manual selection, preview.
- Website LLMs.txt plugin, WordPress.org. The single-purpose option.
- WordPress.org plugin API, read September 23, 2026. Active install counts for all four plugins above.
- Webflow, “Upload an llms.txt file for your site”. Settings path, July 23, 2025 launch, root-serving behaviour.
- Wix, “Understanding Your Site’s llms.txt File”. Dashboard path, premium-plan prerequisite, reset-to-default behaviour.
- Squarespace Forum, “LLMS.txt Files on Squarespace Sites”. The 7.1 settings path and the 7.0 limitation.
- Shopify Community, “Shopify Just Killed /llms.txt for all stores”. Merchant reports; discovery only, not proof.
- Next.js discussion 80692. Evidence that no built-in convention exists.
- Live responses for allbirds.com and colourpop.com at
/llms.txtand/agents.md, fetched September 23, 2026. The Agent Instructions document and its media type. - Canlah AI llms.txt. The worked example, 113 lines and 15,953 bytes on September 23, 2026.
- Canlah AI audit archive for canlah.ai, September 7, 2026. 39 questions, three runs each, ChatGPT and Gemini; the 71 overall score, the GEO dimension score of 4 and the 7 of 177 mention count.
See where your brand stands in AI answers. Run the free AI visibility audit →
Related articles
FREE WHITEPAPER
Marketing in the Agent Era
All 13 chapters public — no email wall. Includes an original dataset on the agent-readiness of 50 cross-border DTC brands.
Read it free →