November 24, 2026 · 5 min read

How to Create an llms.txt File for a Shopify Store

Learn how to create a Shopify llms.txt file, choose useful links, publish it through your theme, and test whether it improves AI visibility.

How to Create an llms.txt File for a Shopify Store

To create an llms.txt file for a Shopify store, first check the file Shopify already serves at yourstore.com/llms.txt. If you need a different, curated guide to your products and policies, add templates/llms.txt.liquid to your published theme, then test the live URL and the links inside it. The file can help an agent find useful pages, but publishing it does not guarantee an AI assistant will recommend your store.

Key takeaways

  • Shopify already serves /llms.txt by default, so inspect it before creating a template.
  • Use a dedicated llms.txt.liquid template only when its content should differ from /agents.md.
  • Curate links to buying-relevant collections, products, and policies rather than dumping your catalog.
  • Test the rendered file and its links, then measure recommendations separately from file availability.

Does your Shopify store already have an llms.txt file?

Yes, in most cases. Shopify serves a managed /agents.md document and mirrors its content at /llms.txt and /llms-full.txt unless you provide a relevant theme template. Shopify calls /agents.md its canonical agent-discovery document. Its template lookup documentation specifies which file controls each route.

Open https://yourstore.com/llms.txt and https://yourstore.com/agents.md on your primary domain. If the managed content accurately describes how agents can discover your store, you may not need to change anything. This is especially worth checking if your team has a ticket to fix a supposedly missing file: a generic file and a missing file are different problems.

Shopify announced support for these theme templates on May 28, 2026. Advice that says merchants must use a redirect or upload a text file to a theme asset to reach /llms.txt predates the native template support.

ApproachWhat /llms.txt servesWhen to use it
Shopify-managed defaultShopify's generated /agents.md contentThe default already meets your needs
templates/agents.md.liquidYour custom agent documentAll three discovery URLs should share your content
templates/llms.txt.liquidA separate, curated llms.txtYou want a buying-focused guide without replacing /agents.md

That distinction matters. Replacing agents.md.liquid also changes the fallback content at /llms.txt and /llms-full.txt. Adding only llms.txt.liquid leaves the other two routes alone.

What should a Shopify llms.txt file contain?

An llms.txt file is a short Markdown guide to a site's most useful pages, not a product feed or a crawler-access rule. The llms.txt proposal calls for a site-name H1, an optional summary blockquote, and optional H2 sections containing descriptive links. The H1 is its only required section.

For a D2C brand, choose links that answer the questions a shopping assistant must resolve before recommending a product:

  • Category fit: Link to a focused collection that establishes what you sell.
  • Product evidence: Link to a small number of representative, in-stock product pages with clear specifications.
  • Purchase constraints: Link to published shipping, returns, and warranty policies where applicable.
  • Site discovery: Include the sitemap if a reader needs a wider route into the catalog.

Write the summary in plain language: product category, differentiator, and any qualification you can substantiate on a linked page. Avoid claims such as guaranteed fastest shipping or best quality unless your site supports them. Use stable, absolute URLs on your primary domain; do not invent .md versions of product pages that do not exist.

A file with a handful of useful links is easier to maintain than a pasted catalog. For background on the terms used in an AI visibility audit, keep an AI search glossary nearby, but make the file itself understandable without one.

How do you add llms.txt.liquid to a Shopify theme?

In Shopify admin, go to Online Store > Themes. On the theme you intend to publish, select ... > Edit code, open Templates, and create a file named llms.txt.liquid. Shopify's template guide confirms that this template serves the root /llms.txt URL. Edit a duplicate theme first if your team requires review before publication.

Start with a small template like this, replacing the example collection and product handles with live URLs from your store:

# {{ agents.store_name }}

> Replace this line with one accurate sentence about your products and who they suit.

## Shop by category

- [Core collection]({{ agents.store_url }}/collections/your-collection-handle): Describe the category and its intended use.

## Featured products

- [Representative product]({{ agents.store_url }}/products/your-product-handle): Name the distinguishing material, size, or use case.

## Buying information

- [Sitemap]({{ agents.sitemap_url }}): Find other published pages.

The agents.store_name, agents.store_url, and agents.sitemap_url values come from Shopify's agents Liquid object. This template has a restricted Liquid context: shop, products, collections, and other usual theme globals are not available here. Use the documented agents values for store-level information and add verified page links manually. Do not paste a regular product-template loop into this file and expect it to render.

Before saving, replace every placeholder. Add shipping and returns links only after confirming their live URLs and current terms. If your catalog changes often, assign someone to review the curated links when featured products are retired.

How do you test the file and judge whether it helps?

Publish the theme, then test the public URL rather than trusting the code editor's contents:

  1. Open https://yourstore.com/llms.txt in a private browser window. Confirm it shows Markdown with your store name, not a password page or unresolved {{ ... }} expressions.
  2. Open every linked product, collection, and policy. Check that each page is live, relevant, and available on the domain and market you intended.
  3. Reopen /agents.md. A dedicated llms.txt.liquid should not have replaced that document.
  4. Record a baseline of repeatable buying prompts, including a competitor comparison, before treating any change in AI recommendations as an outcome.

File availability and recommendation visibility are separate measurements. Google says its Search features, including generative AI features, do not use llms.txt files. Nor should you assume every assistant fetches your file. Keep the underlying product and policy pages accurate whether or not an agent reads this guide.

For a Shopify team reporting to a founder or CMO, the useful question is not merely whether /llms.txt returns content. It is whether the same buying prompts start producing accurate mentions of your products instead of a rival's. AgentRank can run weekly ChatGPT and Perplexity prompt tests with competitor benchmarking, so you can check that outcome alongside the implementation work. It cannot make every AI engine read the file or guarantee a recommendation.

If you want a repeatable way to test visibility after publishing, try AgentRank on the Shopify App Store.

FAQ

Do I need llms.txt if Shopify already provides agents.md?

Usually not. Shopify's managed /llms.txt mirrors /agents.md by default. Create a dedicated template only if you have a useful, distinct set of links or context to maintain.

Will adding llms.txt make my products appear in ChatGPT or Google AI Overviews?

No guarantee follows from publishing the file. Google says its Search features do not use llms.txt; for other assistants, test recommendations rather than assuming they read it.

Can I build llms.txt with a normal Shopify product Liquid loop?

No. The llms.txt.liquid template has a restricted Liquid context, so regular products and collections globals are unavailable. Use verified links and the supported agents object instead.

shopifyllms.txtai searchtechnical seogenerative engine optimization

Frequently asked questions

Do I need llms.txt if Shopify already provides agents.md?

Usually not. Shopify's managed /llms.txt mirrors /agents.md by default. Create a dedicated template only if you have a useful, distinct set of links or context to maintain.

Will adding llms.txt make my products appear in ChatGPT or Google AI Overviews?

No guarantee follows from publishing the file. Google says its Search features do not use llms.txt; for other assistants, test recommendations rather than assuming they read it.

Can I build llms.txt with a normal Shopify product Liquid loop?

No. The llms.txt.liquid template has a restricted Liquid context, so regular products and collections globals are unavailable. Use verified links and the supported agents object instead.

Seven years of Shopify, on one page.

Roles, projects, stack and certifications are on the resume.

Resume Download PDF LinkedIn