How to Add LLMs.txt to Shopify
Get your llms.txt file live on your Shopify store
Quick summary: Shopify does not let you upload files directly to the root domain. You will need to use the theme file approach or a workaround. The file will be accessible at yourstore.myshopify.com/llms.txt or your custom domain equivalent.
Method 1: Theme File Upload (Recommended)
- Generate your llms.txt file using our free tool
- Log in to your Shopify admin
- Go to Online Store > Themes
- Click Actions > Edit code on your active theme
- In the Assets folder, click Add a new asset
- Name the file
llms.txt and paste your generated content - Save the file
- Create a URL redirect: Go to Online Store > Navigation > View URL redirects
- Add redirect from
/llms.txt to /assets/llms.txt - Test by visiting yourstore.com/llms.txt
Method 2: Page Redirect Workaround
- Generate your llms.txt file
- Go to Online Store > Pages in Shopify admin
- Create a new page with title "LLMs.txt" (set it to hidden from navigation)
- In the page content, paste your llms.txt content inside a pre-formatted code block to preserve formatting
- Save the page and note the handle (e.g.,
/pages/llms-txt) - Go to Navigation > URL redirects
- Create redirect from
/llms.txt to your page URL
Method 3: Using a Third-Party App
If you prefer a no-code approach, some Shopify apps allow file uploads and custom URL management. Search the Shopify App Store for "file manager" or "custom pages" apps. Note that most paid apps are unnecessary for this simple task — the theme file method above is free and reliable.
Important Shopify Notes
- Custom domains: If you use a custom domain (e.g., yourstore.com), ensure the redirect works on both the custom domain and the .myshopify.com domain.
- Theme updates: If you switch themes, you will need to re-add the llms.txt asset file. Consider keeping a backup of your content.
- Headless Shopify: If you use a headless setup (e.g., Hydrogen, Next.js storefront), host llms.txt on your frontend server instead using the Next.js method below.
Troubleshooting
Redirect not working
Shopify URL redirects can take a few minutes to propagate. Clear your browser cache and try again. Ensure there is no conflicting page at /llms.txt.
File shows HTML instead of plain text
If using the page method, ensure the content is in a pre-formatted block. For the asset method, the file should serve as text/markdown automatically.