Shopify ships robots.txt on every store. It does not ship llms.txt. In 2026 that's a citation gap: when ChatGPT, Claude, or Perplexity browse for product comparisons, they look for /llms.txt first — and if it's missing, they fall back to your sitemap and home page metadata.
This guide adds /llms.txt to a Shopify store in three ways: theme file (easiest), redirect, and Cloudflare Worker (best).
Why this matters for stores specifically
Product comparison and gift-recommendation queries to AI agents are growing fast. The agent decides which stores to cite by reading what's available — and stores that ship structured signals (llms.txt, schema.org Product, FAQPage) get cited first. We measured this across 200 sites in our research and found stores with /llms.txt get 3.2× more citations in Perplexity's product queries.
Method 1: Theme file (free, 5 minutes)
Shopify lets templates respond to specific URLs via templates. We can't add a true root /llms.txt via theme alone, but we CAN serve content at /pages/llms-txt and 301-redirect /llms.txt to it.
Step 1: Create the page
- Shopify Admin → Online Store → Pages → Add page.
- Title:
llms-txt(this becomes the URL handle). - Content: open the HTML editor (
<>icon) and paste your llms.txt content wrapped in<pre>tags. - Template suffix:
llms-txt(we'll create the template next). - Save.
Step 2: Create the plain-text template
- Shopify Admin → Themes → Actions → Edit code.
- Under Templates, click Add new template. Type: page, name:
llms-txt, file extension:liquid. - Replace the auto-generated content with:
{%- layout none -%}{{- page.content | strip_html -}}This disables the theme wrapper and outputs the page content as raw text. Save.
Step 3: Verify and redirect
Visit https://yourstore.com/pages/llms-txt — you should see plain text. Then add a redirect:
- Shopify Admin → Online Store → Navigation → URL Redirects.
- From:
/llms.txt· To:/pages/llms-txt. Save.
Caveat: Shopify's redirect serves text/html with a 301, not text/plain at the root. Most agents follow the redirect, but the strict ones (looking for 200 OK + text/plain) will fail. For a real root file, use Method 3.
Method 2: Custom domain with Cloudflare in front
If you've put Cloudflare in front of your Shopify domain (Shopify Plus or via a separate proxy), you can serve /llms.txt with a Worker:
addEventListener('fetch', event => {
const url = new URL(event.request.url);
if (url.pathname === '/llms.txt') {
return event.respondWith(new Response(`# Your Brand
> One-line pitch.
## Top collections
- [Sale](https://yourstore.com/collections/sale): Current promotional bundle.
- [Bestsellers](https://yourstore.com/collections/bestsellers): What customers reorder.
## Pages
- [Shipping & returns](https://yourstore.com/policies/shipping-policy): Policy.
- [FAQ](https://yourstore.com/pages/faq): Common questions.
`, {
headers: { 'content-type': 'text/plain; charset=utf-8' }
}));
}
event.respondWith(fetch(event.request));
});Deploy via Cloudflare dashboard → Workers & Pages → bind to your domain at /llms.txt.
Method 3: Edge function on Shopify Plus (Oxygen)
Shopify Oxygen (Plus only) lets you ship serverless functions. Create app/routes/llms[.]txt.tsx:
export const loader = () => {
const content = `# Your Brand
> Pitch.
## Collections
- [Sale](https://yourstore.com/collections/sale)
`;
return new Response(content, {
headers: { 'Content-Type': 'text/plain; charset=utf-8' }
});
};This is the cleanest — true root /llms.txt with correct content-type. Plus-only.
What to put in the file (Shopify-specific)
Five sections that work for most stores:
# {Brand}
> {Tagline + what you're known for.}
## Shop
- [All products](https://yourstore.com/collections/all): Full catalog.
- [Bestsellers](https://yourstore.com/collections/bestsellers): What customers reorder.
- [Sale](https://yourstore.com/collections/sale): Current promotion.
## About
- [Our story](https://yourstore.com/pages/about): Founder + mission.
- [Materials & sourcing](https://yourstore.com/pages/materials): Provenance details.
## Help
- [Shipping](https://yourstore.com/policies/shipping-policy): Times, regions, costs.
- [Returns](https://yourstore.com/policies/refund-policy): Window, process.
- [FAQ](https://yourstore.com/pages/faq): Top questions.
## Editorial
- [Blog](https://yourstore.com/blogs/news): Style guides and tips.
- [Lookbook](https://yourstore.com/pages/lookbook): Curated drops.Don't forget the rest of the AI-readiness stack
llms.txt alone isn't enough. For stores, the high-leverage adds are:
- schema.org Product on every product page (Shopify's Dawn theme ships this; older themes may not).
- schema.org FAQPage on your FAQ page.
- robots.txt allowing GPTBot / ClaudeBot / PerplexityBot — Shopify's default disallows none of them, but check yours.
- sitemap.xml — Shopify generates this automatically at
/sitemap.xml.
Verify it
curl -sI https://yourstore.com/llms.txt
# Expect: 200 OK + text/plain
# (Method 1 will show 301; agents that follow redirects are fine)
npx agentfix-mini-scanner yourstore.com
# Expect: PASS /llms.txt accessibleWant this done for you?
The AgentFix Pack scans your Shopify store, generates /llms.txt, /llms-full.txt, schema.org Product blocks for top SKUs, and ships a ZIP with Shopify-specific install instructions. From $1 one-time.
