Agentic commerce
How should an ecommerce store write its llms.txt?
Updated
Generate the file from the same data that builds your navigation and sitemaps, so it cannot drift. Open with two or three sentences on what the store sells and who it serves, then list category and key content URLs with a short description each. Keep it small. Before publishing, request the path and read what is already there — replacing a platform-generated file can remove endpoint information you did not know it contained.
Check what is there before you write one
This is first because it is the step nobody takes and the one with a real downside. On some platforms the file is generated for you and contains more than a description — it can name the endpoints through which an agent discovers and transacts with your store.
We found three brands that hand-wrote a considered file, and two of them never mention endpoints their own store answers on. Whether the custom file displaced a generated one or the generated one was never enabled cannot be determined from outside, but the outcome is the same: a careful document that omits the store's most consequential machine-facing capability.
So request the path, read it, and carry forward anything it names.
What to include
The useful version is short and orienting. It is not a sitemap — you already have one of those, and duplicating it wastes the one thing this file offers, which is editorial judgement about what matters.
- What you sell and who it is for, in two or three plain sentences.
- Category URLs with a one-line description each, so a reader can route without guessing.
- The pages that answer real pre-purchase questions: sizing, ingredients, shipping, returns.
- A pointer to your sitemap index as the authoritative, always-current URL list.
- Any machine endpoints your store serves, named explicitly.
Generate it; do not maintain it
The single rule that decides whether this file is an asset or a liability. A hand-maintained index rots within two deploys, and a stale index is worse than none because it points confidently at pages that have moved.
Build it from the source that already drives your navigation and sitemaps. Then it updates when the catalog does, and nobody has to remember it exists.
Two mistakes worth avoiding
Do not paste your full product catalog. A file in the megabytes is not a summary, and one host in our sample serves two megabytes at that path — which turns out to be its catch-all HTML page rather than a file at all, a mistake nobody noticed because nothing errors.
Do not treat it as a permissions file. It grants nothing and withholds nothing. If the goal is to control what crawlers may fetch, that is robots.txt and your edge configuration, and writing it here achieves exactly nothing.
Frequently asked questions
- How long should it be?
- Short enough to read in full. The generated files we measured sit around four kilobytes, and a good hand-written one for a focused catalog was under three. If it is approaching megabytes, something has gone wrong.
- Should I list every product?
- No. List categories and the content that answers pre-purchase questions, then point at your sitemap index for the complete URL set. The file earns its place through judgement about what matters, not through coverage.
- Where does the file go?
- At the root of the domain customers actually type, served as markdown or plain text. Check the content-type after deploying — a route that quietly returns HTML looks fine in a browser and is worthless to a machine.
Sources
- DTC AI crawler index — 147 brands, collected 14 August 2026 — PlatformDTC (primary data)
- Stores accepting an agent checkout whose own llms.txt never says so — PlatformDTC (primary data)
- The /llms.txt file — proposal and specification — llmstxt.org (primary specification)