Tutorial · Shopify · GEO

How to add llms.txt to Shopify

The Shopify situation changed twice in spring 2026 and most guides on the internet are out of date. Here's what's actually true as of mid-2026: Shopify now serves llms.txt natively for every store, with auto-generated default content. You can override it, you can replace it with a plugin, or you can leave it alone — but you can't ignore it. Here's how to handle each path.

· 13 min read · Lab451

What's different about Shopify

On most platforms, adding llms.txt means writing or generating a file and uploading it. On Shopify, that approach does not work — Shopify's platform architecture doesn't let merchants put arbitrary files in the root directory. For years, this meant llms.txt required workarounds: Cloudflare Workers, URL redirects, third-party apps. Most of those workarounds are now obsolete.

Two things changed in spring 2026:

The practical upshot: every Shopify store already has an llms.txt, whether the merchant set it up or not. Your job isn't to add one — it's to decide whether the auto-generated default is good enough, and if not, how to replace it.

What's already there: check first

Before doing anything else, open yourstore.com/llms.txt in a browser. You'll either be redirected to /agents.md (newer stores) or land directly on the file. What you see is Shopify's default for your store.

Shopify's default content typically includes:

Two things to notice. First: it's quite bare-bones — far less than the rich, curated map the spec encourages. Second: it leads with Shopify itself, not your store. The "Agents & Developers" section often appears before your products, which means an AI agent reading the file meets Shopify's pitch before yours.

Should you override the default?

Honest answer: it depends, and as of mid-2026 the answer is leaning toward "yes, but cautiously."

The case for leaving Shopify's default alone:

The case for overriding:

Our recommendation: override if you have content beyond products — blog posts, buying guides, brand stories, FAQs. Leave the default if you're a pure-product store with little editorial content. Shopify's auto-generation actually does a decent job for the latter case.

Method 1 — Leave Shopify's default in place

The zero-effort approach. Do nothing. The file is live, AI crawlers can fetch it, you don't have to maintain anything.

If you go this route, two small things still worth doing:

  1. Verify Agentic Storefronts is enabled. In your Shopify admin, go to Settings → Sales channels and make sure "Agents and AI" is on. As of March 2026, every eligible US merchant is opted in by default — but always check.
  2. Make sure your product data is clean. The default llms.txt pulls from your product titles, descriptions, and metadata. Garbage in, garbage out.

Method 2 — Override with a Liquid template

The most powerful and most controllable approach — and the only one that gives you full editorial control without paying for an app. Shopify lets you override the platform-generated llms.txt by creating a specific Liquid template in your theme.

  1. In your Shopify admin, go to Online Store → Themes.
  2. Click the three dots next to your live theme and select Edit code.
  3. In the file tree on the left, find the Templates folder. Right-click it and choose Add a new template.
  4. Choose page as the template type, and name it llms-txt (no dot, no extension — Shopify adds the .liquid automatically). The full filename will be page.llms-txt.liquid.
  5. Replace the contents of the new template with your own Markdown. Critically, add {% layout none %} at the very top to strip the theme wrapper:
{% layout none %}{{- '' -}}
# {{ shop.name }}

> {{ shop.description | strip_html | strip_newlines }}

## Main Pages

- [Home]({{ shop.url }}/): {{ shop.name }} homepage
- [Shop All]({{ shop.url }}/collections/all): Browse the full catalog
- [Contact]({{ shop.url }}/pages/contact): Get in touch
- [About]({{ shop.url }}/pages/about): Our story

## Featured Collections

{% for collection in collections limit: 5 -%}
- [{{ collection.title }}]({{ shop.url }}{{ collection.url }}): {{ collection.description | strip_html | truncate: 80 }}
{% endfor %}

## Recent Articles

{% for blog in shop.metafields.custom.featured_blogs -%}
{% for article in blog.articles limit: 3 -%}
- [{{ article.title }}]({{ shop.url }}{{ article.url }}): {{ article.excerpt | strip_html | truncate: 80 }}
{% endfor %}
{% endfor %}

## Optional

- [Terms]({{ shop.url }}/policies/terms-of-service)
- [Privacy]({{ shop.url }}/policies/privacy-policy)
- [Returns]({{ shop.url }}/policies/refund-policy)
  1. Now create a page that uses this template. Go to Online Store → Pages → Add page. Title it anything (e.g. "llms"), and in the template selector on the right, choose page.llms-txt. Save.
  2. Create a redirect from /llms.txt to the new page. Go to Online Store → Navigation → URL redirects and add: from /llms.txt to /pages/llms (or whatever you titled the page).

The {% layout none %} line is critical. Without it, Shopify wraps your output in the full theme HTML — header, footer, nav, the whole thing. AI crawlers fetching /llms.txt would get an HTML document instead of plain Markdown. The page template still serves as text/html rather than text/plain, but the body content is at least clean Markdown, which is what matters.

Method 3 — Use a dedicated app (Yoast, AdNabu, 10x GEO)

If the Liquid method feels fiddly, the Shopify App Store now has purpose-built tools. The three worth knowing about:

The general flow with any of them:

  1. Install from the Shopify App Store.
  2. Connect to your store data (most do this automatically).
  3. Configure: choose auto-generation, paste in custom content, or some hybrid.
  4. Save. The app handles the override and the refresh cycle.

App gotcha: several of these apps generate too much by default — every product, every variant, every collection, every blog post. A 5,000-line llms.txt is worse than a 60-line one because it forces models to summarize rather than read. Look for a "max items per section" or "include only featured" setting and tighten it down. The spec rewards curation.

A note on the /agents.md redirect

Since May 2026, Shopify has been redirecting /llms.txt to /agents.md. This is a 301 redirect, which means crawlers that request the original URL get permanently rerouted. The content at the new URL is identical to what would've been at the old one.

What this means in practice:

The /agents.md name is Shopify's bet on a future standard — there's been growing discussion in the broader ecosystem about whether "agents" is a better naming than "llms," but as of mid-2026 the rest of the industry is still on llms.txt. Shopify is ahead of the curve here, for better or worse.

Verify it's working

Whichever method you use, validate the result before moving on:

  1. Visit yourstore.com/llms.txt in an incognito window. If you're redirected to /agents.md, that's normal. The destination should be plain Markdown, not your storefront.
  2. Check the response headers. Browser dev tools → Network tab. Look for Content-Type — should be text/markdown, text/plain, or text/html with clean Markdown body content.
  3. Validate the Markdown structure. One H1, one blockquote, H2 sections with link lists. The spec is strict; deviations cause parsing failures.
  4. Re-check periodically. Shopify has changed this feature twice already in 2026. Make a calendar reminder to revisit every month or two to confirm nothing has shifted.

Shopify-specific gotchas

You cannot upload files to the root

Shopify doesn't expose the file system. You cannot SFTP a file to the root the way you can on WordPress or static hosts. Every approach has to work through the platform — apps, Liquid templates, or the platform default.

Files in Content → Files won't serve at the root

Shopify's Content → Files upload puts files at a CDN URL (something like cdn.shopify.com/s/files/.../llms.txt), not at yourstore.com/llms.txt. AI crawlers won't find them there. This is the most common mistake — don't waste time on it.

Older guides recommend Cloudflare Workers

Pre-2026, the standard workaround was to put your store behind Cloudflare and use a Worker to intercept /llms.txt requests. This still technically works but is now obsolete: Shopify serves the file natively, so the Worker has nothing to intercept unless you're explicitly overriding. If you've inherited a Cloudflare Worker for this purpose, audit whether it's still needed.

Theme updates can break the Liquid override

If you used Method 2 and then update your theme, the new theme won't have your page.llms-txt.liquid template. Move the template into a child theme if your theme supports it, or keep a backup of the file in version control.

Shopify Plus stores have additional options

Shopify Plus merchants can use Shopify Functions or a custom Storefront API setup to serve llms.txt in more sophisticated ways. If you're on Plus and have a developer, talk to them about whether the standard approaches are sufficient or whether a custom solution makes sense.

The bigger picture: Agentic Storefronts

Shopify's llms.txt work is part of a broader push called Agentic Storefronts, launched March 24, 2026. By default, every eligible US merchant is opted in. The product premise: AI agents (ChatGPT, Perplexity, Copilot, Google AI Mode) can transact on your store directly — not just send users to your store.

llms.txt is one piece of that. The other pieces:

Getting llms.txt right is necessary but not sufficient. A clean llms.txt tells the agent what your store is; the rest of the stack tells it what you sell and how to buy it. Both matter.

Frequently asked questions

Do I need to do anything at all if I'm a small Shopify merchant?

Probably not, as long as Agentic Storefronts is enabled and your product data is clean. Shopify's auto-generated llms.txt will be decent for a pure-product store. The override is most valuable when you have editorial content beyond products.

Will Shopify's defaults eventually be removed?

Unlikely — they're now part of the platform. But they may continue to change. Treat Shopify's documentation as the source of truth and re-check quarterly.

Should I add llms-full.txt too?

Shopify doesn't currently support llms-full.txt natively. For most ecommerce stores it's not as critical as for docs sites — your products are the content, and they're already well-structured. We covered the broader decision in llms.txt vs llms-full.txt.

What about international stores with /en, /fr, etc.?

Each regional storefront on Shopify Markets gets its own llms.txt at its own URL. Override per region using the same Liquid template approach, or use one of the apps that handles multi-region stores natively.

How often does Shopify regenerate the default?

Shopify hasn't published an exact schedule, but based on observation it's roughly weekly. Major changes (new bestsellers, deleted products) show up within a few days.

Can I see analytics on who's reading my llms.txt?

Not directly within Shopify. You'd need a third-party log analyzer (or one of the GEO-focused apps like 10x GEO) to filter your server logs by user-agent and report on AI crawler activity. This is improving fast — expect more visibility tools through 2026.

Does this work for Shopify subscription products?

Yes. Subscriptions are normal products from the llms.txt perspective — they show up in collection listings and product feeds the same way. The subscription billing happens at checkout, not at discovery.


Generate your file in 30 seconds

Lab451 produces a spec-compliant llms.txt for any Shopify store. Use it as the content for your Liquid template override, or as a sanity check against what Shopify's default is serving. Free for stores under 50 pages.

Generate my file →