Traditional search engines crawl millions of raw HTML tags, strip away navigation menus, and parse whatever product information survives.
AI shopping assistants work under tighter context budgets and stricter verification rules. When ChatGPT, Perplexity, Claude, or Google AI inspect your storefront,
they want two complementary layers working together: a clean table of contents showing where your authoritative catalog and policy pages live (/llms.txt),
and unambiguous, machine-readable structured data on every product page (ProductGroup and Product JSON-LD).
Most tutorials still circulate outdated workarounds that silently fail on modern storefronts—like telling Shopify merchants to upload text files into Content > Files
with a URL redirect, or outputting single-variant JSON-LD that omits return windows and variant identifiers.
Here is the accurate, production-tested way to configure both llms.txt and AI Product Schema across
Shopify, Shopify Plus,
and BigCommerce (covering both standard themes and headless Hydrogen or Catalyst builds).
What llms.txt Actually Does (And Where It Fits Alongside Feeds)
Before writing a line of markup, keep realistic expectations in mind. Adding llms.txt does not bypass low product quality,
blocked crawlers, or broken pricing feeds. Instead, it solves a real technical annoyance: modern eCommerce themes carry heavy header navigation,
mega-menus, recommendation carousels, and cookie banners.
A well-structured /llms.txt file sits at your root domain as clean, plain-text Markdown.
It hands AI agents an uncluttered briefing covering who you are, what categories you specialize in, links to your flagship buying guides,
and direct URLs for shipping, warranty, and return policies—without forcing an agent to scrape fifty noisy HTML templates first.
Think of it as pairing cleanly with our AI product feed optimization playbook:
feeds supply live SKU pricing and inventory, llms.txt orients AI assistants across your brand and category structure,
and on-page JSON-LD proves exact specs and variant relationships on every URL.
What to Include Inside a High-Signal eCommerce llms.txt
Resist the urge to dump 4,000 raw SKU links into llms.txt. Bloating the file defeats its purpose.
Keep llms.txt crisp (under ~100 curated high-value links) and reserve bulk catalog markdown exports for /llms-full.txt or structured product feeds:
# Brand Name+>Summary Block: Two crisp sentences explaining your niche, primary regions shipped, and core differentiator.## Core Collections: Direct links to your highest-margin category pages with brief 1-line descriptions of what shoppers find there.## Flagship Product Lines: Direct links to hero models, bundles, or comparison hubs.## Sizing, Compatibility & Care Guides: Plain HTML guides that answer complex pre-purchase constraints.## Policies & Trust: Direct URLs for shipping speed, return policy, warranty terms, and B2B/wholesale inquiries.
Shopify vs. BigCommerce: Implementation Matrix
Hosting methods differ sharply depending on whether your storefront runs on a native theme or a headless architecture.
| Storefront Stack | llms.txt Hosting Method |
Product Schema Architecture | Critical Gotcha to Avoid |
|---|---|---|---|
| Shopify Online Store (Liquid) | Theme template templates/llms.txt.liquid using {% layout none %} |
Custom Liquid JSON-LD snippet outputting ProductGroup + Metafield specs |
Old Admin URL Redirects to cdn.shopify.com files are overridden by native Shopify routing |
| Shopify Hydrogen (Headless) | Remix / React Router route app/routes/llms.txt.tsx returning text/plain |
Server-rendered JSON-LD script in product route backed by Storefront API | Returning text/html instead of text/plain; charset=utf-8 causes parsers to skip |
| BigCommerce Stencil | Upload to WebDAV /content/llms.txt + 301 Redirect from /llms.txt |
Handlebars JSON-LD partial in product view with parent/variant SKU mapping | Default theme schema often omits ProductGroup, shipping, and return details |
| BigCommerce Catalyst (Next.js) | Static public/llms.txt or dynamic App Router handler app/llms.txt/route.ts |
Typed Next.js JSON-LD component synchronized with GraphQL Storefront data | Ensure dynamic variant selection URLs match inProductGroupWithID |
Part 1: Setting Up llms.txt on Shopify (Online Store & Hydrogen)
Option A: Standard Shopify & Shopify Plus Themes (templates/llms.txt.liquid)
Wait—before searching for a workaround using Content > Files and URL Redirects, note a major platform shift:
Shopify now handles /llms.txt, /llms-full.txt, and /agents.md natively at the root domain.
Because Shopify claims those paths directly, old Admin URL Redirects and /apps/... app proxies no longer override the root URL reliably.
Instead, Shopify natively checks your active theme for custom templates—looking first for templates/llms.txt.liquid
(and optionally templates/llms-full.txt.liquid or templates/agents.md.liquid).
- In Shopify Admin, go to Online Store > Themes, click the … menu on your live theme, and select Edit code.
- Under the Templates folder, click Add a new template (or add file) named
llms.txt.liquid. - Start the very first line with
{%- layout none -%}so Shopify strips outtheme.liquidHTML headers and footers and serves raw plain-text Markdown.
{%- layout none -%}
# {{ shop.name }}
> {{ shop.description | strip_html | default: "Official storefront for " | append: shop.name }}
> Currency: {{ shop.currency }} | Support: {{ shop.email }}
## Core Collections
{%- for collection in collections limit: 8 -%}
{%- if collection.products_count > 0 and collection.handle != 'all' -%}
- [{{ collection.title }}]({{ shop.url }}{{ collection.url }}): {{ collection.description | strip_html | strip_newlines | truncate: 130 }}
{%- endif -%}
{%- endfor -%}
## Featured Products
{%- for product in collections['best-sellers'].products limit: 10 -%}
- [{{ product.title }}]({{ shop.url }}{{ product.url }}): {{ product.price | money }} — {{ product.metafields.custom.ai_summary | default: product.description | strip_html | strip_newlines | truncate: 120 }}
{%- endfor -%}
## Shipping, Returns & Store Policies
- [Shipping Policy]({{ shop.url }}/policies/shipping-policy)
- [Refund & Return Policy]({{ shop.url }}/policies/refund-policy)
- [Terms of Service]({{ shop.url }}/policies/terms-of-service)
Option B: Headless Shopify Hydrogen (app/routes/llms.txt.tsx)
On a custom Hydrogen storefront deployed on Oxygen or Cloudflare Workers, handle /llms.txt directly inside a route loader
so your response returns live Storefront API collections with an explicit Content-Type: text/plain; charset=utf-8 header:
// app/routes/llms.txt.tsx
import type { LoaderFunctionArgs } from '@shopify/remix-oxygen';
export async function loader({ context }: LoaderFunctionArgs) {
const { collections } = await context.storefront.query(`#graphql
query LlmsCollections {
collections(first: 8) {
nodes { title handle description }
}
}
`);
const lines = collections.nodes.map(
(c: { title: string; handle: string; description: string }) =>
`- [${c.title}](https://www.yourstore.com/collections/${c.handle}): ${c.description.slice(0, 120)}`
);
const body = [
'# Your Brand Name',
'',
'> Technical outerwear and waterproof commuter gear designed for daily weather.',
'',
'## Core Collections',
...lines,
'',
'## Store Policies',
'- [Shipping & Delivery](https://www.yourstore.com/policies/shipping-policy)',
'- [Returns & Warranty](https://www.yourstore.com/policies/refund-policy)',
].join('\n');
return new Response(body, {
status: 200,
headers: {
'Content-Type': 'text/plain; charset=utf-8',
'Cache-Control': 'public, max-age=3600, s-maxage=86400',
},
});
}
Part 2: Setting Up llms.txt on BigCommerce (Stencil & Catalyst)
Option A: Standard BigCommerce Stencil (WebDAV + 301 Redirect)
Because BigCommerce Stencil does not allow arbitrary custom root-directory files next to robots.txt,
use BigCommerce’s built-in WebDAV directory paired with a clean 301 redirect:
- Write your Markdown
llms.txtfile locally and verify UTF-8 plain text encoding. - In BigCommerce Admin, go to Settings > File Access (WebDAV), connect via Cyberduck or your preferred WebDAV client, and upload
llms.txtinside the/content/directory. That immediately makes it reachable athttps://yourstore.com/content/llms.txt. - Navigate to Settings > URL Redirects (or Storefront > URL Redirects) and add a manual 301 redirect from Old URL:
/llms.txtto New URL:/content/llms.txt.
If you manage thousands of changing collections and don’t want to re-upload static WebDAV files manually, you can generate and sync the text file via automated BigCommerce API scripts or vetted catalog automation connectors.
Option B: BigCommerce Catalyst (Next.js App Router)
If you run BigCommerce’s modern Next.js Catalyst storefront (explored in our BigCommerce Stencil vs. Catalyst guide),
setup takes two minutes: either place a static llms.txt inside public/llms.txt, or export a dynamic Route Handler
at app/llms.txt/route.ts querying BigCommerce’s GraphQL Storefront API and returning new Response(markdown, { headers: { 'Content-Type': 'text/plain; charset=utf-8' } }).
Part 3: Upgrading to AI-Ready Product Schema (ProductGroup + hasVariant)
Once an AI crawler reaches your product page, legacy themes typically expose one big blind spot:
their JSON-LD either describes a single generic Product without distinguishing individual sizes/colors,
or outputs only the first variant while stripping out GTINs, return windows, shipping rates, and structured product properties.
Both Google Merchant Center and modern AI shopping engines prefer Schema.org’s ProductGroup pattern for multi-variant products:
using productGroupID, variesBy, and hasVariant, with each child Product declaring inProductGroupWithID
(which maps directly to Google’s item_group_id feed attribute!).
{
"@context": "https://schema.org/",
"@type": "ProductGroup",
"productGroupID": "NRP-PACK-30L",
"name": "Northridge Waterproof Commuter Backpack 30L",
"description": "Carry-on compliant 30L seam-sealed commuter pack with padded 16-inch laptop sleeve and external bottle pocket.",
"brand": { "@type": "Brand", "name": "Northridge" },
"variesBy": [
"https://schema.org/color",
"https://schema.org/size"
],
"additionalProperty": [
{ "@type": "PropertyValue", "name": "Laptop Compatibility", "value": "Up to 16 inches" },
{ "@type": "PropertyValue", "name": "Waterproof Rating", "value": "IPX6 Seam-Sealed TPU" },
{ "@type": "PropertyValue", "name": "Carry-On Compliant", "value": "Yes (19.5 x 12 x 7.5 in)" }
],
"hasVariant": [
{
"@type": "Product",
"@id": "https://www.yourstore.com/products/commuter-30l?variant=blk-30l#product",
"url": "https://www.yourstore.com/products/commuter-30l?variant=blk-30l",
"name": "Northridge Waterproof Commuter Backpack 30L - Matte Black",
"sku": "NRP-30L-BLK",
"gtin13": "0840123456789",
"color": "Matte Black",
"size": "30L",
"inProductGroupWithID": "NRP-PACK-30L",
"offers": {
"@type": "Offer",
"url": "https://www.yourstore.com/products/commuter-30l?variant=blk-30l",
"priceCurrency": "USD",
"price": "149.00",
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition",
"hasMerchantReturnPolicy": {
"@type": "MerchantReturnPolicy",
"applicableCountry": "US",
"returnPolicyCategory": "https://schema.org/MerchantReturnFiniteReturnWindow",
"merchantReturnDays": 30,
"returnMethod": "https://schema.org/ReturnByMail"
},
"shippingDetails": {
"@type": "OfferShippingDetails",
"shippingRate": { "@type": "MonetaryAmount", "value": "0.00", "currency": "USD" },
"shippingDestination": { "@type": "DefinedRegion", "addressCountry": "US" },
"deliveryTime": {
"@type": "ShippingDeliveryTime",
"handlingTime": { "@type": "QuantitativeValue", "minValue": 0, "maxValue": 1, "unitCode": "DAY" },
"transitTime": { "@type": "QuantitativeValue", "minValue": 2, "maxValue": 4, "unitCode": "DAY" }
}
}
}
}
],
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.8",
"reviewCount": "164"
}
}
Implementing ProductGroup Cleanly in Shopify Liquid
Inside your Shopify theme, avoid piling third-party SEO apps on top of existing theme JSON-LD (duplicate competing Product graphs confuse validators).
Instead, replace the default product schema snippet inside snippets/ai-product-schema.liquid using product.id for productGroupID,
iterating over product.variants for hasVariant, mapping variant.barcode to gtin13/gtin12,
and pulling technical specs straight from Shopify Metafields (e.g., product.metafields.specs.waterproof_rating) into additionalProperty.
Implementing ProductGroup Cleanly in BigCommerce
Many BigCommerce Stencil themes only output basic Microdata or single-SKU JSON-LD out of the box.
Inside templates/components/products/product-view.html (or a dedicated schema partial), output clean JSON-LD populated from Handlebars product context
(or via BigCommerce’s Storefront GraphQL product options + metafields on Catalyst), making sure sku, gtin (UPC/EAN),
live stock status, and shipping/return policies match your Merchant Center and Perplexity product feeds down to the exact cent.
6-Point Technical Verification Before You Call It Done
- Check HTTP Status & Headers on
/llms.txt: Runcurl -I https://yourstore.com/llms.txtand confirm HTTP200(or clean301->200on Stencil WebDAV) with plain-text output and zero HTML wrapper tags. - Confirm Zero Duplicate JSON-LD Graphs: Inspect the live PDP source and remove redundant app-injected
Productschema so one authoritativeProductGroupgraph remains. - Validate in Google Rich Results Test: Test at least three multi-variant product URLs and confirm zero missing
price,availability,hasMerchantReturnPolicy, orshippingDetailserrors. - Cross-Check Feed IDs: Confirm
productGroupID/inProductGroupWithIDmatchesitem_group_idin Google Merchant Center andgroup_idin OpenAI’s feed. - Verify AI Crawler Access: Confirm
robots.txtand Cloudflare WAF rules permitOAI-SearchBot,ChatGPT-User,PerplexityBot,Perplexity-User, andStorebot-Google. - Check Mobile Performance: Keep schema rendered server-side in Liquid, Handlebars, or Next.js Server Components—never inject JSON-LD lazily via client-side JavaScript tags that slow down page paint or get missed by lightweight fetchers.
Frequently Asked Questions: llms.txt & AI Product Schema
Does Shopify automatically generate /llms.txt if I don’t add a template?
Yes—Shopify serves a native default discovery file, which is also why old Admin URL Redirects to uploaded CDN files stop working.
Adding templates/llms.txt.liquid with {%- layout none -%} gives you full control over collections, Metafield summaries, and store policies directly on your primary domain.
Should I list every SKU inside llms.txt?
No. Keep llms.txt focused on brand context, core collections, flagship products, buying guides, and store policies.
Large SKU catalogs belong in structured product feeds (Google Merchant Center, OpenAI, Perplexity) and optionally a companion /llms-full.txt file.
What if my store sells single-SKU products with no color or size variants?
Use standard @type: "Product" JSON-LD directly instead of ProductGroup, while still including gtin/mpn,
additionalProperty specifications, Offer shipping and return details, and AggregateRating.
Why do AI crawlers sometimes miss client-injected JSON-LD from Shopify SEO apps?
Lightweight AI retrieval bots (such as ChatGPT-User or Perplexity-User) often parse raw HTML responses without executing heavy third-party JavaScript bundles.
Rendering your ProductGroup JSON-LD directly on the server via Liquid, Stencil Handlebars, or Catalyst Server Components guarantees every crawler reads it immediately.
Need Help Wiring AI Discovery Into Your Storefront?
Clean llms.txt routing, Metafield-driven ProductGroup JSON-LD, and live feed synchronization work best when built directly into your theme or headless architecture—not layered under five conflicting SEO plugins.
At Northstar, our engineers build fast, AI-discoverable storefronts on Shopify, Shopify Plus, BigCommerce, and headless Hydrogen & Catalyst stacks. Book a technical schema and AI discovery audit with our architects today.




