Setting Up llms.txt in Shopify With the llms.txt.liquid Template
Until recently, Shopify stores could not place a file at the root of the domain, so getting an llms.txt meant redirects to a page or a third-party app. That changed in 2026.
Shopify now answers /llms.txt on every store, by default with the same agent-focused content it serves at /agents.md, and theme developers can replace it with a template called llms.txt.liquid. This guide explains what your store serves today, how to write your own version within the template's limits, and how to clean up the workarounds you may have added before.
What Shopify does now
During spring 2026 Shopify stores began answering at /agents.md, /llms.txt
and /llms-full.txt without any action from the merchant. On 28 May 2026 Shopify's developer
changelog documented how to customise them. According to Shopify's documentation, the arrangement works
like this:
- Every store has a Shopify-managed agents.md, written for AI shopping agents. It describes how an agent can discover, search and buy from the store through Shopify's agent interfaces.
- By default, /llms.txt and /llms-full.txt show that same content. They are alternative addresses for the agents.md file, not a separate llms.txt about your shop.
- A theme can override each path with its own template:
templates/agents.md.liquid,templates/llms.txt.liquidandtemplates/llms-full.txt.liquid. - If a path has no template of its own, Shopify falls back to the agents.md template, and if there is none, to its own generated default.
- The files are served at the bare primary domain, with no locale or Markets subfolder in the address.
So an llms.txt "missing" finding is now unusual on Shopify. The more common situation is that a file exists but was written for shopping agents rather than as the short, curated guide to your content that the llms.txt proposal describes: a name, a summary, and sections of links with notes.
Should you override the default at all?
This is a real decision, not a formality. The Shopify default is maintained for you and kept in step with Shopify's agent features. The moment you add your own template, Shopify's documentation is clear that you take responsibility for keeping it current.
| Leave the default if | Write your own llms.txt.liquid if |
|---|---|
| You have no time to maintain another file | You will review it whenever collections or policies change |
| Your store is small and the collection pages speak for themselves | Your store has guides, size charts, care advice or trade terms worth pointing to |
| You mainly care about agents that buy through Shopify's own interfaces | You want tools reading llms.txt to get a plain description of the business |
| You are happy with the auditor's findings on the current file | The auditor reports format or content problems with what is served |
A good middle path is to override only /llms.txt and leave /agents.md alone.
Shopify's agent content then stays managed at its own address, and your llms.txt links to it for agents
that need it. Avoid creating agents.md.liquid unless you mean to replace the agent instructions
too, because that template also becomes the fallback for the other two paths.
The limits of the template
The llms.txt.liquid template is not an ordinary theme template, and it helps to know its limits before you start writing.
- Only two Liquid objects are available:
requestandagents. The usual globals such asshop,collections,products,pagesandarticlesare not provided and render blank. You cannot loop over your catalogue to build the list. - It must be a Liquid template, named exactly
llms.txt.liquid. It cannot be a JSON template, and it has no sections or blocks, so it cannot be edited in the theme customiser. - The content is text or Markdown with Liquid. Anything you type is output as it stands, apart from Liquid tags.
- The agents object gives a handful of store values, including
agents.store_name,agents.store_url,agents.currencyandagents.sitemap_url, along with the agent endpoints. - It lives in the theme. Because the template is a theme file, it goes with the theme. If you publish a different theme, the new one will not have your template until you copy it across.
The practical result is that on Shopify llms.txt is written by hand. That suits the proposal well, since a curated list with useful notes is exactly what it asks for, but it means the file will not update itself when you add a collection. Put it on the checklist you use when launching a new range.
The fix, step by step
Step 1
Check what your store serves at /llms.txt
Run curl -sSL https://www.example.co.uk/llms.txt | head -n 30 against your
primary domain and read the result. If it describes agent endpoints, protocol versions and a checkout
flow, you are seeing Shopify's default mirrored from agents.md. If it shows your own text, an older workaround
or a template is already in place. Note whether the request was redirected, and to where, because redirects
point to earlier set-ups that need tidying.
Step 2
Remove old workarounds
Before
native support, many stores redirected /llms.txt to a page such as /pages/llms
or installed an app to serve it. Look in the URL redirects list in the admin for a redirect from /llms.txt,
check for a page with an alternate template built for the file, and review any llms.txt app. Remove what
you no longer need so there is only one version, served natively, and nothing contradicts it.
Step 3
Choose the collections and pages to list
Pick the pages that explain your shop to someone who has never seen it: your main collections,
your About page, delivery and returns, size or fitting guides, care instructions and contact details.
Shopify policies live at addresses such as /policies/refund-policy and /policies/shipping-policy.
Leave out individual products unless a handful are genuinely flagship lines, and never list search, cart,
account or filtered collection addresses.
Step 4
Create the llms.txt.liquid template
Duplicate
your live theme as a backup first. Then open the theme code editor for the live theme, go to the templates
folder and add a new file named exactly llms.txt.liquid. If the editor's template menu does
not offer this type, create it as a new file in that folder, or add it locally and upload it with Shopify
CLI using shopify theme push. Do not create a JSON version of the template.
Step 5
Write the file and keep a link to agents.md
Write the file in the llms.txt structure: an H1 with the shop name, a blockquote
summary, a line of key facts, then H2 sections of links with notes, using full addresses on your primary
domain. Add an entry that links to /agents.md so AI shopping agents can still find Shopify's
instructions after you replace the default. Use agents.store_name or agents.currency
only where you want those values filled in automatically.
Step 6
Check the live output and run the auditor
Save the template and request /llms.txt again with curl. Confirm that it
returns 200 as plain text, that the first line is your H1, that Liquid values have filled
in correctly and that no redirect happens on the way. Open /agents.md as well to make sure
it still shows Shopify's default. Then run the llms.txt Auditor on the store's primary domain and work
through any format or link findings.
An example llms.txt.liquid for a small shop
This template is for a fictional leather goods shop. Everything is typed by hand except the shop name
and currency, which come from the agents object. URLs are written out in full so the output
is predictable whatever form agents.store_url takes.
{%- comment -%}
Custom llms.txt. Review when collections, policies or delivery terms change.
{%- endcomment -%}
# {{ agents.store_name }}
> Handmade leather belts, wallets and bags from a small workshop in
> Northamptonshire. Online shop only, shipping to the UK and Europe.
> Prices are in {{ agents.currency }} and include VAT for UK orders.
Every item is made to order; dispatch is usually within 10 working days.
## Collections
- [Belts](https://www.example.co.uk/collections/belts): widths, buckle options, how to measure
- [Wallets and card holders](https://www.example.co.uk/collections/wallets): styles, leather colours, personalisation
- [Bags](https://www.example.co.uk/collections/bags): totes and satchels, sizes and strap lengths
## Help
- [Sizing guide](https://www.example.co.uk/pages/belt-sizing): measuring an existing belt or your waist
- [Leather care](https://www.example.co.uk/pages/leather-care): cleaning, conditioning, water marks
- [Delivery](https://www.example.co.uk/policies/shipping-policy): costs and times for the UK and Europe
- [Returns](https://www.example.co.uk/policies/refund-policy): returns window, personalised items, refunds
## About
- [Our workshop](https://www.example.co.uk/pages/about): who makes the goods, materials and tannery sources
- [Contact](https://www.example.co.uk/pages/contact): email, response times, trade enquiries
## Optional
- [Agent instructions](https://www.example.co.uk/agents.md): Shopify's guide for AI shopping agents
- [Journal](https://www.example.co.uk/blogs/journal): workshop news and product stories
Shopify's documentation describes agents.store_url as the bare primary domain. If you
would rather build links from it, render the file once and check that there are no doubled or missing
slashes before relying on it. Structure rules are covered in the format
guide.
llms-full.txt and agents.md on Shopify
By default /llms-full.txt also mirrors agents.md, so after you customise llms.txt the
two files will describe different things. You have three options:
- Leave it. It keeps showing the agent content. That is harmless, though a tool expecting the full text of your key pages will not find it there.
- Write llms-full.txt.liquid. Because the template has no access to products or pages, any full text has to be pasted in by hand, which only makes sense for a few stable pages such as the sizing guide, care instructions and policies. It then needs updating each time those pages change.
- Override agents.md. Only do this if you intend to replace Shopify's agent instructions, and understand that it becomes the fallback for both other paths.
For most shops the first option is the sensible one. The llms-full.txt guide explains when a full-text file is worth the effort at all.
Robots.txt still matters more
Shopify generates robots.txt and lets you change it through a robots.txt.liquid template.
Whatever your llms.txt says, crawlers that you block there will not read your pages. Check it alongside
llms.txt using the robots.txt AI blocks
guide.
Shopify Markets, languages and multiple stores
- One file for all markets. The file is served at the bare primary domain without Markets subfolders, so a store selling in several countries or languages has one llms.txt. Say in the summary which markets and languages you serve, and link the main collection page for each language version if you have translated URLs. The language guide covers labelling.
- Separate stores per country. If you run expansion stores, such as a separate EU store, each store has its own theme and its own template. Write one per store, in that store's language.
- Headless storefronts. If your customer-facing site is a custom front end, such as Hydrogen or another framework, on its own domain, what visitors and tools see at that domain is controlled by your front end, not by the theme template. Check which host serves your public pages and put the file there.
- Theme changes. When you switch or update to a new theme, copy
llms.txt.liquidinto it before publishing, then check/llms.txtstraight after the switch.
1. Does my Shopify store already have an llms.txt?
Almost certainly. Since spring 2026 Shopify has served /llms.txt on stores by default, showing the same content as the Shopify-managed agents.md file, which is written for AI shopping agents. Open your own domain followed by /llms.txt, or fetch it with curl, to see what yours contains. If it shows your own text instead, a theme template or an older workaround is in place, and you should check which one is responsible.
2. Why can I not loop over my collections in llms.txt.liquid?
Shopify only provides the request and agents objects to this template. The normal global objects such as shop, collections, products and pages are not injected and render blank, so loops over them output nothing. That is a deliberate limit of the template, not a mistake in your code. The answer is to write the list of collections and pages by hand, which also gives you the chance to write a useful note for each one.
3. Will a custom llms.txt break AI shopping agents?
Not if you leave agents.md alone. Overriding llms.txt only changes that one address. Shopify's agent instructions stay at /agents.md, and agents built to use Shopify's interfaces look there. Adding a link to /agents.md in your llms.txt, as in the example in this guide, makes sure anything that starts at llms.txt can still find those instructions. Avoid creating an agents.md.liquid template unless you really mean to replace them, because it also becomes the fallback for the other two addresses.
4. Should I delete my old /llms.txt redirect?
Yes, once you have confirmed that the native file or your template is being served. A redirect from /llms.txt to a page was a workaround for the time when Shopify could not serve the file, and at best it now duplicates the native file; at worst it sends tools to an HTML page instead. Removing it leaves one clear version at the standard address, which is what the auditor and any other tools expect.
5. Do I still need an llms.txt app from the Shopify App Store?
Probably not for serving the file, since Shopify now does that natively and the theme template lets you control the content. Some apps may still offer help drafting notes or checking links, but check how any app interacts with the native file before keeping it, because two sources of the same file cause confusion. If an app no longer does anything useful, uninstall it and remove any redirects or pages it created.
6. Is the llms.txt template the same for every language in Shopify Markets?
Yes. The file is served at the bare primary domain without a locale or Markets subfolder, so every market shares one llms.txt. Write it in your main language, name the other languages and markets in the summary, and point to the main translated collection pages if your store has translated URLs. If you run completely separate stores per country, each store has its own theme and therefore its own template.
7. Will customising llms.txt improve my Shopify SEO?
There is no evidence that it will. Google representatives have said Google Search does not use llms.txt, and no major AI search provider has confirmed reading it. Your product and collection pages, their titles, descriptions, structured data and crawl access do the real work in search. A clear, accurate llms.txt is a tidy extra for tools that read it, and the default Shopify file already covers AI shopping agents, so treat this as a finishing job rather than a priority.
The llms.txt Auditor fetches your /llms.txt and /llms-full.txt files, validates them against the proposed format, checks that each linked URL responds, confirms robots.txt allows the relevant AI crawlers and scores the quality of the content.
Open llms.txt Fixes โ