GEO tutorial
How to Add llms.txt to Shopify
The short answer: you probably already have one. Since May 2026 every Shopify store serves /llms.txt by default — it mirrors the store's /agents.md file, with the store name, policies and the endpoints AI shopping agents use. If that default is enough, you are done. If you want your own wording — your brand story, your best collections, your own links — add a file called llms.txt.liquid to your theme's Templates folder. No app, no redirect, and nothing uploaded to Files.
First, what llms.txt is — and is not
llms.txt is a proposal, not a formal web standard. It was published in September 2024 as a way for a site to hand AI tools a short, plain-language introduction plus a curated list of its most useful pages, so an AI reader does not have to wade through menus, cookie banners and scripts. Google has said clearly that Search does not use the file — not for ranking, not for AI Overviews, not for AI Mode. Adding or customising one is a low-effort experiment that may help some AI tools understand your store; it is not a ranking lever, and no honest guide should present it as one. Keep that in mind before you spend more than an hour on it.
Step 1: Check what your store serves today
Open yourstore.com/llms.txt and yourstore.com/agents.md in a private browser window and save both as your baseline. On a standard Shopify store the two files show the same content: your store name and URL, a link to your sitemap, your published policies, and the discovery endpoints shopping agents use. The file is written for shopping agents, so it does not describe your brand or list your products — that is the gap a custom file fills. If the default already says enough for you, stop here. There is nothing to install and nothing to maintain. Headless Hydrogen storefronts are the exception: they may not get these files by default, so if either address returns a 404, the file has to be added in your front end's own code, not in the Shopify theme.
Step 2: Remove the old redirect workaround
Older guides told merchants to upload a file in Content > Files and add a URL redirect from /llms.txt to the uploaded file's address. That workaround stopped working once Shopify began serving the file itself in May 2026 — merchants reported their redirects no longer taking effect, because Shopify now resolves the path natively. If you followed one of those guides, check the live URL: the file agents see today is probably Shopify's default, not yours. Remove the uploaded file and delete the redirect before you add a template, or you will be debugging two competing sources of the same address. The template method below is the one Shopify documents now.
Step 3: Write your content from real facts
The shape is the same as for any site: one H1 naming the store, one short summary paragraph, then your best pages grouped under H2 sections, each link with a short factual description. For a store that means your flagship collections, your best-selling product lines, your shipping and returns pages, and your story page — the pages a shopping assistant would actually need. If you are not sure where to start, read our guide on how to write an llms.txt file first — it walks through the whole structure with a complete example you can copy. The short version is below; swap in your own pages and use full URLs throughout.
# Example Outdoors Store > An independent outdoor gear shop: tested hiking boots, trail clothing and honest repair guides. ## Collections - [Trail Boots](https://example.com/collections/trail-boots): Waterproof hiking boots, tried on real trails. - [Trail Clothing](https://example.com/collections/trail-clothing): Layers for wet and cold weather. ## Help - [Shipping & Returns](https://example.com/policies/shipping-policy): Delivery times and the 30-day return promise. - [Boot Fitting Guide](https://example.com/pages/boot-fitting): How to measure your feet at home.
Step 4: Create the llms.txt.liquid template
In your Shopify admin, go to Online Store, then Themes. Open the menu on your live theme and choose Edit code. Right-click the Templates folder, choose New File, and name it llms.txt.liquid — Shopify offers llms.txt as a template type, so pick it from the list rather than typing a free-form name. Paste your Markdown in and save. Shopify looks for templates in this order for /llms.txt: your llms.txt.liquid first, then agents.md.liquid, then its own default. Adding llms.txt.liquid changes only /llms.txt and leaves /agents.md and /llms-full.txt on the managed default, which is the safer choice if you only want to customise the one file. If you want all three files to carry your wording, create agents.md.liquid instead — but know that you then take over the agent instructions too, and you maintain them from then on. Duplicate your live theme before you edit code, so you can roll back if anything goes wrong.
Step 5: Validate the live file
A file that exists is not the same as a file that works. Once it is live at yourstore.com/llms.txt, run it through our free llms.txt validator: enter your domain and it fetches the file, scores it from 0 to 100, and gives a fix for every failed check — a missing summary, a broken link, a duplicate URL, a relative link that points nowhere outside your store. Fix what fails at the source — in the template, not in a redirect — and re-check. If you want to understand each check before you fix it, the companion guide on how to validate your llms.txt file explains what the validator tests and why each check matters. Only announce the file once it passes cleanly.
Common pitfalls
Liquid objects that render blank. Only the request and agents objects work inside llms.txt.liquid. Standard objects such as shop, collections and articles come out blank, so do not build the file out of Liquid loops. Type your store details in as plain text with full URLs, or use the values Shopify documents for this template, such as agents.store_name, agents.store_url and agents.sitemap_url. Open the live file after saving and check that no Liquid shows up blank.
Primary domain only. The file is served only on your bare primary domain. There are no localized versions for Shopify Markets subfolders, so one file has to serve every market. Keep it in your default language and link to pages that exist for all visitors.
Private data in a public file. Shopify warns against putting private data such as contact emails in these files, because they are cached and served to every agent that asks. Keep the file to public facts: what you sell, where to find it, and your published policies.
Forgetting to maintain it. Shopify warns that adding llms.txt.liquid makes you responsible for keeping it current. A custom file that still lists a discontinued collection or a removed policy page is worse than the accurate default. Put a reminder in your calendar to review it whenever you launch a collection or change a policy — or keep the managed default and skip the custom file entirely.
Expecting a ranking boost. As noted above, Google Search does not use llms.txt, and no AI company has confirmed it as a standard input to its crawler. Treat the file as a tidy introduction for the AI tools that do read it, keep it accurate as your store changes, and judge it by whether it stays correct — not by whether your rankings move. On WordPress instead? See how to add llms.txt to WordPress.