llms.txt for Shopify
Shopify does not let you upload arbitrary files to your domain root, so llms.txt needs either an app or an edge workaround. Here are the options that actually serve the file.
Last updated:
The short answer
Shopify hosts your theme and assets on its own infrastructure and does not document a built-in
llms.txt setting. Static assets you upload live on Shopify's CDN domain, not at
yourstore.com/llms.txt. That leaves two practical routes: an App Store app that
registers the path for you, or an edge proxy in front of your domain.
Option A: an App Store app
Search the
Shopify App Store for "llms.txt": several apps generate and serve the file at the right path. Before installing, check that the
app serves the file at
/llms.txt on your primary domain (not a proxied app subpath), lets you edit the content
manually, and does not inject anything else into your storefront.
Whatever the app produces, run it through the validator: app output quality varies, and a malformed file is worse than none.
Option B: edge proxy (Cloudflare Worker)
If your DNS is managed on Cloudflare with the proxy enabled, a small Worker can answer
/llms.txt itself and pass every other request through to Shopify untouched:
// Cloudflare Worker: serves /llms.txt in front of your storefront.
// Requires your domain's DNS to be on Cloudflare with the proxy enabled.
// Check Shopify's current domain-connection requirements before proxying.
const LLMS_TXT = `# Your store
> One-sentence factual description of your store.
## Collections
- [Bestsellers](https://yourstore.com/collections/bestsellers): top products.
## Customer service
- [Shipping policy](https://yourstore.com/policies/shipping-policy): delays and costs.
- [Returns](https://yourstore.com/policies/refund-policy): how returns work.
`;
export default {
async fetch(request) {
const url = new URL(request.url);
if (url.pathname === '/llms.txt') {
return new Response(LLMS_TXT, {
headers: { 'content-type': 'text/plain; charset=utf-8' },
});
}
return fetch(request); // everything else passes through to Shopify
},
};
Add a Workers route for yourstore.com/llms.txt only, so the Worker never touches checkout
or other paths. Note that Shopify has specific requirements for how custom domains connect; verify
your setup keeps Shopify's SSL and checkout flows working before going live.
What to avoid
- Linking a CDN copy. A file at
cdn.shopify.com/.../llms.txtis not at your domain root; convention-following tools will not find it. - Pasting the content into a page. An HTML page at /pages/llms-txt is not the file;
the spec expects plain Markdown at
/llms.txt.
FAQ
Does llms.txt help my store's Google SEO?
No, Google has said it does not use it. The case for it is AI assistants and crawlers; see llms.txt and SEO.
What should a store list in the file?
Top collections, shipping and returns policies, size guides, and the FAQ. The pages an AI assistant needs to answer pre-sale questions accurately.