How to Set Up llms.txt in Shopify for AI Agents
Shopify doesn't support custom files at root by default — but llms.txt can still be served via theme code or Pages. This guide covers Shopify-specific implementation: theme code approach, Pages-based approach, content selection, and verification. Pair with llms.txt guide and WordPress version.
Step-by-step: How to set up llms.txt on Shopify
- Decide content for llms.txt. Curated list of your highest-value content: top product collections, comprehensive guides on Shopify Blog, About/FAQ pages. Not full sitemap. 20-100 entries.
- Choose serving approach. Option A: Theme template. Create templates/llms.liquid in theme; create a page with that template. URL becomes /pages/llms. Use URL redirect to map /llms.txt → /pages/llms. Option B: Static page approach — create a Page in admin, paste markdown content, accept the /pages/llms URL. Option C: Shopify app that handles llms.txt (a few emerging — 'LLM Crawler Optimizer').
- Implement via theme template. Online Store → Themes → Edit code → templates/llms.liquid. Set content-type and output markdown directly: {%- layout none -%}{%- comment -%}...generate markdown content here using liquid loops over products/collections/pages...{%- endcomment -%}. Create a page in admin and assign this template.
- Set up redirect. Online Store → Navigation → URL Redirects → from '/llms.txt' to '/pages/llms'. Now visitors to yourstore.com/llms.txt get redirected (301) to the page that serves the content.
- Verify file is accessible. Visit yourstore.com/llms.txt. Should redirect to /pages/llms which displays markdown content. Test from curl: 'curl -L https://yourstore.com/llms.txt' should show the markdown content.
- Add an llms-full.txt variant (optional). Some AI agents look for llms-full.txt with complete content (not just links). Same approach as llms.txt but include actual page content not just links. Larger file, more useful for AI agents.
- Monitor AI agent traffic. Shopify Plus: Analytics → Live View → filter by user-agent. Standard plans: limited bot visibility. Cloudflare-fronted stores: Cloudflare analytics shows AI bot requests.
🤖 Validate Shopify llms.txt
Check your llms.txt is accessible and well-structured.
Run llms.txt Check →Frequently Asked Questions
Why can't Shopify serve /llms.txt directly without redirect?
Shopify routing requires files to be at specific paths: /pages/SLUG, /products/SLUG, /collections/SLUG, /blogs/SLUG. Root-level custom files aren't supported. The redirect approach works for AI agents that follow 301s (most do).
Do AI agents follow the 301 redirect from /llms.txt?
Yes — major AI crawlers follow 301 redirects. GPTBot, ClaudeBot, PerplexityBot all handle redirects normally. Some lesser-used or experimental agents may not — but the major ones do.
Can I use a Shopify app to serve llms.txt?
Emerging market. A few apps in late 2024/2025 offer llms.txt management (LLM Crawler Optimizer, AI SEO Booster). They typically use the same redirect pattern. Apps make it easier but cost monthly fees vs free theme template approach.
Should Shopify llms.txt list products or only blog content?
Both have value. Products help AI agents recommend specific items. Blog content (long-form guides) helps AI agents cite your expertise. Recommended structure: H2 'Featured Products' (top 20 collections or hero products) + H2 'Guides' (top 20 blog posts) + H2 'Reference' (About, FAQ, Shipping).
Will llms.txt help Shopify products show up in ChatGPT?
Improving but unproven. ChatGPT doesn't yet officially consume llms.txt; Anthropic's Claude does. Even where not consumed directly, having a curated llms.txt costs little and positions you for future AI agent adoption.