---
title: "How to publish a valid llms.txt on Shopify"
slug: llms-txt-shopify
published: 2026-08-26T13:33:48.826562+00:00
updated: 2026-08-27T13:45:28.641034+00:00
author: "Asif Rahman"
author_url: https://masifrahman.com
category: "AI Readiness"
tags: check:C2, platform:shopify, Shopify, llms.txt, agents.md, AI crawlers, Liquid themes
description: "Shopify already serves /llms.txt on Liquid themes. Add templates/llms.txt.liquid to replace the default, then verify check C2 with one free AIScan scan."
url: https://aiscan.site/blog/llms-txt-shopify
---

If your store runs a Liquid theme, Shopify already serves `/llms.txt` for you. We checked four live storefronts on 26 August 2026 (Allbirds, Brooklinen, Kotn and Red Bull Shop US) and all four returned `HTTP 200` with `content-type: text/markdown; charset=utf-8`. So on Shopify, check **C2** is usually a one-minute confirmation rather than a build. The real work is replacing Shopify's generic default with a file that describes your catalogue, which takes one theme template and about fifteen minutes.

## Quick summary

| If you want to… | Do this | Where | Time |
|---|---|---|---|
| Confirm you already pass C2 | `curl -sI https://yourstore.com/llms.txt` | Terminal | 1 min |
| Replace Shopify's default text | Create `templates/llms.txt.liquid` | **Online Store > Themes > … > Edit code** | 15 min |
| Control the long-form file too | Add `templates/llms-full.txt.liquid` | Same code editor | +10 min |
| Keep it in step with your catalogue | Generate llms.txt and agents.md from an app | [StoreSEO](https://storeseo.com/) | 5 min |
| Fix a 404 | You are probably headless. Serve the route from your frontend | Your Hydrogen or Next.js app | 30 min |

**The short answer:** do not upload a file. Shopify has no writable web root, and `/llms.txt` is a theme template on this platform, not a static asset.

## What Shopify already does for you

Shopify's own template documentation says it "manages `/llms.txt` by mirroring the content of `/agents.md`" when no template exists. That default is real Markdown and it is genuinely useful. On the stores we checked it points agents at the [Universal Commerce Protocol](https://ucp.dev) discovery endpoint at `/.well-known/ucp` and at the store's MCP endpoint. But it says nothing about what you sell, who you ship to, or which page answers a returns question.

That is the gap worth closing. The llms.txt format, proposed by Jeremy Howard of Answer.AI on 3 September 2024, treats an H1 naming the project as the only required section; everything below it is a curated set of links you choose. Nobody but you can choose them.

## Step 1: find out what your store serves right now

```bash
curl -sI https://yourstore.com/llms.txt | grep -Ei 'http/2|content-type|pageType'
```

A pass looks like this:

```
HTTP/2 200
content-type: text/markdown; charset=utf-8
server-timing: ... pageType;desc="llms_txt" ...
```

That `pageType;desc="llms_txt"` value is the useful part. It proves Shopify's own route served the file, rather than a redirect or an app proxy answering on its behalf.

## Step 2: write your own llms.txt

From your admin, open **Online Store > Themes**, then the **…** menu on your published theme and **Edit code**. Under **Templates**, create a file named exactly `templates/llms.txt.liquid`. Shopify announced these customisable templates in its developer changelog on 28 May 2026, together with `templates/agents.md.liquid` and `templates/llms-full.txt.liquid`.

Two constraints catch people out:

- The file must be `.liquid`. A `.json` template will not work here.
- Only the `request` and `agents` objects are injected. `shop`, `collections` and `articles` are **not** available, so anything else has to be written literally.

A working starting point:

```liquid
# Northwind Supply

> Independent outdoor gear. Ships to the US and Canada.
> Free returns within 60 days.

## Catalogue
- [All products](https://northwind.example/collections/all): full catalogue with prices in USD
- [Size guide](https://northwind.example/pages/sizing): measurements for every model

## Policies
- [Shipping and returns](https://northwind.example/policies/refund-policy)

## Contact
- support@northwind.example
```

Save, and the file is live at `https://yourstore.com/llms.txt`.

One inheritance rule is worth knowing before you start: if `llms.txt.liquid` is absent, Shopify falls back to `agents.md.liquid`, and only then to its generated default. Add `agents.md.liquid` alone and your custom text will be served at `/llms.txt` too, which is often what you want.

## The no-code path: generate it from your catalogue

The template above is a static file you maintain by hand. That is fine for a stable catalogue and it ages badly for everything else, because nothing regenerates it when you add a collection or retire a line.

[StoreSEO](https://storeseo.com/) is the Shopify app we build, and it closes that gap: it generates llms.txt from your actual products, collections, pages and articles, and gives you a no-code editor for agents.md, the same file Shopify falls back to, so the two cannot drift apart. Both sit on its free plan alongside a 25-product optimisation allowance, so you can see the generated file before paying for anything. It is published by Storeware, carries Shopify's Built for Shopify badge, and is rated 5.0 from 685 reviews on [the Shopify App Store](https://apps.shopify.com/storeseo) as of 27 August 2026.

If you want that one file and nothing else, [LLMs.txt Generator](https://apps.shopify.com/llms-txt) is a single-purpose alternative, though it is a much newer listing with only 4 reviews so far. And if you would rather install nothing, the theme template above is complete on its own. Nothing in this guide requires an app.

## What this file will not do

It is served at your bare primary domain only. There is no localised counterpart and no Markets subfolder version, so `https://yourstore.com/en-ca/llms.txt` returns 404 by design. Never link to a locale-prefixed copy.

It also will not move you in Google. Google's AI optimisation guidance states plainly that Google Search ignores these files, and that maintaining one neither helps nor harms rankings. [Ahrefs' June 2026 study](https://ahrefs.com/blog/llmstxt-study/) of about 137,000 domains found 28% publish a valid llms.txt and 97% of those files received zero requests in May 2026, with the authors' own caveat that their sample skews technical, so treat 28% as an upper bound. Publish one for directed tools and agentic browsers, not for Google. We went through that evidence in [does llms.txt actually work in 2026](https://aiscan.site/blog/does-llms-txt-actually-work-2026).

## How to verify it worked

**Start with a scan.** [AIScan](https://aiscan.site) is free, needs no account, and grades **C2 llms.txt** as its own named check inside the [content dimension](https://aiscan.site/docs/checks/content), next to C1 Markdown negotiation, C3 structured HTML, E3 server-rendered text and E5 content feed, so a partial score names the row that is still open:

```bash
npx aiscan-cli yourstore.com
```

**If you would rather check by hand**, two commands settle it:

```bash
SITE=https://yourstore.com
curl -sL -o /dev/null -w '%{http_code} %{content_type}\n' $SITE/llms.txt
curl -sL $SITE/llms.txt | head -1
```

**Pass:** `200 text/markdown; charset=utf-8`, and the first line is your own `#` heading rather than "Agent Instructions —".

**Fail, and what it means.** A 404 on a Liquid theme usually means you edited an unpublished theme; check the file exists on the theme marked **Current theme**. A 200 that still returns Shopify's default text means the filename is wrong — it is `llms.txt.liquid`, not `llms-txt.liquid`. A 200 with `content-type: text/html` means something other than Shopify is answering that path.

**What no scanner can see, ours included:** whether the links inside your file are the right ones, whether the file is current after a catalogue change, and whether any agent ever fetches it. AIScan checks that a valid file exists and parses. Judgement about the contents stays yours.

## When it returns 404

Headless storefronts do not get this for free. A Shopify store whose frontend is served by Next.js returned 404 on `/llms.txt` when we checked, because the Liquid template layer never runs. The storefront is a separate app. On Hydrogen or a custom frontend you add the route yourself and return `text/markdown`. Our [llms.txt generator](https://aiscan.site/llms-txt-generator) will produce the body to paste in.

## Maintenance

A hand-written template needs revisiting whenever you add or retire a collection, and after any theme migration. A new theme means a new `templates/` directory, and the file does not travel with your settings. Generating it with [StoreSEO](https://storeseo.com/) instead moves that chore off your calendar, since the file is rebuilt from the catalogue rather than remembered.

If you also run a WordPress site beside the store, [ThinkRank](https://thinkrank.ai) does the equivalent job there, handling llms.txt, robots.txt, robots meta and schema from one plugin.

Then scan the store, confirm C2 passes, and work down the rest of the content dimension: [more platform walkthroughs are in our guides index](https://aiscan.site/guides), and the Shopify-specific checks are collected on [our Shopify page](https://aiscan.site/docs/platforms/shopify).


