AI assistants are increasingly being used to discover and recommend products. When someone asks ChatGPT "where can I buy X?" or Perplexity "best stores for Y," having an llms.txt file on your Shopify store increases the likelihood of being cited. This tutorial shows you how.
Shopify limitation: Unlike WordPress, Shopify doesn't give you direct filesystem access. You can't simply upload a file to your root directory. This guide covers the workarounds available within Shopify's ecosystem.
Contents
Step 1: Generate Your llms.txt File
First, create the content of your llms.txt using our free generator:
- Visit llmsgenerator.com
- Enter your Shopify store URL and click "Fetch from URL"
- The tool fetches your pages, products, and collections
- Review and edit the generated output
- Copy the content (you'll paste it into Shopify in the next step)
Method 1: Theme Template Route (Recommended)
Shopify's Liquid templating system allows you to create custom URL routes by adding template files. This is the cleanest approach and doesn't require any third-party apps.
Go to Online Store → Themes → Edit Code
In your Shopify admin, navigate to Online Store → Themes. Click the three-dot menu (⋮) next to your active theme and select Edit code.
Create a new template
In the file tree on the left, find the Templates folder. Click "Add a new template." Name it page.llms and select type page.
Add the template content
Paste this Liquid code into the template file:
{% layout none %}
{{ page.content }}
Create a page in Shopify admin
Go to Online Store → Pages → Add page. Set the title to llms.txt. In the content area, paste your llms.txt content. Then in the Template dropdown (bottom right), select page.llms. Save the page.
Set the page handle to "llms.txt"
In the page editor, click on Search engine listing to expand it. The URL handle should be set to llms.txt. This makes the page accessible at yourdomain.com/pages/llms.txt.
Note: Shopify routes pages under /pages/, so your URL will be yourdomain.com/pages/llms.txt rather than yourdomain.com/llms.txt. Most AI crawlers will still find and read the file. You can reference this URL in your llms.txt-aware configurations.
Method 2: App Proxy
For stores where the /pages/ path is unacceptable, a Shopify App Proxy lets you serve content at a custom URL path like /a/llms.txt or even /llms.txt via a backend function.
This approach requires a Shopify app with a backend (Node.js or Ruby). If your store already uses a custom app or you're a developer, this gives you full control over the response URL and content-type headers.
For most merchants, Method 1 (the page template) is sufficient — the AI discovery benefit doesn't require the file to be at exactly /llms.txt.
llms.txt Template for Shopify Stores
Here's an example llms.txt for a typical Shopify store. Customize the content for your store:
# Your Store Name
> [Your store name] is an online store selling [product category].
> We ship to [countries/regions]. Free shipping on orders over $[amount].
## Shop
- [All Products](/collections/all): Browse our full catalog.
- [New Arrivals](/collections/new-arrivals): Our latest products.
- [Best Sellers](/collections/best-sellers): Most popular items.
- [Sale](/collections/sale): Discounted and clearance items.
## Collections
- [Collection Name](/collections/collection-slug): Description of this collection.
- [Collection Name](/collections/collection-slug): Description of this collection.
## Information
- [About Us](/pages/about): Our story and brand values.
- [FAQ](/pages/faq): Common questions about ordering, shipping, and returns.
- [Shipping Policy](/policies/shipping-policy): Shipping rates and delivery times.
- [Return Policy](/policies/refund-policy): Our returns and exchange policy.
- [Contact](/pages/contact): How to reach customer support.
## Optional
- [Blog](/blogs/news): Tips, guides, and updates from our team.
Verify It Works
After completing Method 1:
- Visit
https://yourdomain.com/pages/llms.txt - You should see the plain text content of your llms.txt file (no HTML wrapper)
- If you see your page content with Shopify's theme applied, the template isn't assigned correctly — go back and confirm
{% layout none %}is in the template
Why This Matters for Shopify Stores
AI assistants are increasingly used for product discovery. Queries like "best eco-friendly water bottles under $30" or "where to buy handmade leather wallets" are now answered by AI with specific store recommendations. Stores with clear, structured content — including an llms.txt file — are more likely to be cited.
Your llms.txt gives AI crawlers a direct summary of what you sell, who you are, and what your policies are — without forcing them to reverse-engineer it from your product pages and navigation.
Generate your Shopify store's llms.txt
Auto-fetch your store structure. No signup, no data sent to our servers.
Generate llms.txt Free →