How to add llms.txt to Shopify
Shopify is the tricky platform. It won't let you drop a file at your domain root, and the Files area only gives you long /cdn/ URLs. Since AI crawlers only look at https://yourstore.com/llms.txt, you need one of these workarounds.
Start by generating the file — paste your Shopify store URL and get a spec-compliant llms.txt from your real product and collection pages.
Generate my llms.txt →Option A — Cloudflare in front of Shopify (best if you have it)
If your custom domain is proxied through Cloudflare, you control the root path before Shopify sees the request. Two ways:
- Cloudflare Worker / Snippet — intercept
/llms.txtand return the text directly withcontent-type: text/plain. The file never touches Shopify. - Redirect rule — 301
/llms.txtto a file you host elsewhere (Pages, R2, a Gist raw URL). Simpler, but a redirect rather than a true root file — most crawlers follow it, some prefer a direct 200.
Option B — A Shopify app that serves llms.txt
Several SEO / AI-readiness apps now publish an llms.txt at the root for you. Install, paste the content you generated, and it answers root requests. Lowest effort if you don't use a CDN — just confirm the app serves it at the exact root path and as text/plain, not as a redirect to a /cdn/ URL.
Option C — Reverse proxy (advanced)
If you already run a proxy or edge layer in front of your store, add a route that returns the file for /llms.txt and passes everything else through to Shopify. Same idea as the Cloudflare Worker, for non-Cloudflare stacks.
What to avoid
- A Shopify page at
/pages/llms-txt— it renders HTML, not plain text, and isn't at the root. - Uploading to Files — you only get a
/cdn/URL crawlers won't look for. - Forgetting llms-full.txt — if you publish the full version too, serve it at the root the same way.
Generate llms.txt and llms-full.txt from your store URL, then route one of the ways above.
Try the free llms.txt generator →Related: How to create llms.txt · llms.txt for WordPress · vs robots.txt · Do AI crawlers read it?