Setup guide

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.

4
Steps
3
Prereqs
2
Gotchas

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
Step-by-step

Install in 4 steps

  1. 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. 2

    Create a URL redirect

    Go to Online Store → Navigation → URL Redirects. Add a redirect from /llms.txt to /pages/llms-txt.

  3. 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. 4

    Verify

    Fetch yourstore.com/llms.txt with curl -I and check for 200 + text/plain.

Troubleshooting

Redirect loops back to /pages/llms-txt

Use a 302 instead of 301 while testing — Shopify caches 301s aggressively at the edge.

Response is HTML-wrapped

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.

Other platforms