How to add llms.txt to Shopify
Shopify doesn't allow static root files. Use a redirect from /llms.txt to a hosted page with a stripped-down template, or serve via a Shopify App Proxy for full control over headers.
Before you start
- ✓Store admin access to create pages and redirects
- ✓A theme you can duplicate (for the plain-text template)
- ✓An llms.txt body generated and ready to paste
Install in 4 steps
- 1
Create a page named llms-txt
In Shopify Admin → Online Store → Pages, add a new page. Paste your Markdown into the body using a plain-text template.
- 2
Create a URL redirect
Go to Online Store → Navigation → URL Redirects. Add a redirect from /llms.txt to /pages/llms-txt.
- 3
Force a plain-text template
Duplicate page.liquid as page.llms.liquid that outputs only {{ page.content | strip_html }} with Content-Type set via metafields or an app proxy.
- 4
Verify
Fetch yourstore.com/llms.txt with curl -I and check for 200 + text/plain.
Troubleshooting
Use a 302 instead of 301 while testing — Shopify caches 301s aggressively at the edge.
Your custom template isn't being applied. Confirm the page's template assignment is page.llms in the page editor.
Common gotchas
- • Shopify wraps custom pages in theme HTML by default — strip the layout
- • Hydrogen storefronts handle this differently — use a route loader to serve plain text
Generate your llms.txt in 30 seconds
Use the free OptimAIze generator, then follow the steps above to deploy on Shopify.
Frequently asked questions
Does Shopify need both llms.txt and robots.txt?
Yes. robots.txt grants crawler permission; llms.txt curates which pages matter. Together they form the minimum AI-search setup on any Shopify site.
Will adding llms.txt slow down my site?
No. It's a tiny static text file fetched once and cached aggressively. Page-load impact is effectively zero.
How often should I update llms.txt?
Whenever your canonical content set changes — new docs section, new product line, new pricing page. A monthly review is a sensible cadence for most sites.
Can I see whether AI engines read my llms.txt?
Check your server logs for user agents like GPTBot, ClaudeBot, PerplexityBot, and Google-Extended hitting /llms.txt. Most sites see traffic within days of publishing.