Home / Blog / How To Add llms.txt To The Root Directory In Shopify?

How To Add llms.txt To The Root Directory In Shopify?

Noah Grant
Noah Grant |

Shopify merchants who have tried to upload a file to the root of their domain usually describe the experience with a sigh. The Files section happily accepts images, PDFs, and text documents, but every upload ends up on a long CDN URL rather than at a neat address like yourstore.com/llms.txt. That one quirk once turned a small job into an afternoon of redirects and proxy apps.

Things are much simpler now that Shopify handles agent discovery files on its own. One theme template is enough to publish a custom llms.txt at the root of a store. The rest of this guide covers what the file is, why a Shopify store benefits from having one, which AI-friendly files for Shopify store owners deserve attention, and how to add llms.txt so that it actually loads where it should.

What is an llms.txt File?

An llms.txt file is a plain text document, written in Markdown, that sits at the root of a website. The format was proposed to give large language models a short, structured summary of a site. Rather than crawling hundreds of pages and guessing which ones matter, a model can open a single file and see what the business does, how the content is organized, and where the most useful pages live.

Computer screen showing lines of code

Most files follow a similar pattern. The store name appears at the top as a heading, followed by a sentence or two that sums up what the store sells. Below that comes a list of important pages, grouped under small headings such as Collections, Guides, or Policies. Each link usually carries a brief note, for example, "free US shipping on orders over $75," so a model knows what it will find before it follows the link.

How llms.txt differs from robots.txt

The names are close, and the files live in the same spot, so the confusion is understandable. Robots.txt sets rules: crawlers may enter one section and must stay out of another. llms.txt has no authority of that kind. It resembles a note pinned beside the front door, telling a visitor where the useful rooms are and what each one contains.

Why Should Shopify Stores Have an llms.txt File?

Every Shopify store technically already has one, because Shopify serves a default file at the llms.txt address. The real question is whether the default says enough, and for most brands it does not. The automatic version repeats a generic agents.md document that covers technical endpoints and the sitemap while saying very little about the products or the people behind them.

AI chatbot interface showing examples and capabilities

A customized Shopify llms.txt file improves on that in several practical ways:

  • Clearer context for AI assistants: An agent that visits the store can reach the right collection or policy page directly instead of guessing its way through navigation menus.

  • More control over the brand story: The merchant decides which facts an AI system sees first, whether that means materials, shipping regions, or warranty terms.

  • Little ongoing effort: The file is short, and an update after a catalog or policy change takes only a few minutes.

None of this affects search rankings, and that point is worth stating plainly. Google excludes llms.txt from its ranking systems, so a store will not climb the results page because of it. The benefit comes from AI agents and tools that read the file when they visit, and it is best understood in those terms.

What AI-Friendly Files Should Shopify Stores Set Up?

llms.txt is only one member of a small group of files. Shopify recognizes three agent discovery paths, each with a slightly different role. Getting them to work together matters more than perfecting any single one.

agents.md

Shopify treats agents.md as the primary file for AI agents. It describes the store and explains how an agent should navigate it, from searching for products to heading to checkout. A merchant who edits it via the agents.md.liquid template will see those changes appear at the llms.txt and llms-full.txt addresses as well, unless separate templates exist for them. That is why, for many stores, agents.md is the first AI-friendly file worth improving.

llms.txt

As a short map of a store's key pages, llms.txt does its job well. It suits a merchant who would like that address to read as a guided tour, while agents.md keeps the practical shopping instructions.

llms-full.txt

llms-full.txt is the longer companion. Full policy wording, detailed category descriptions, and a full set of FAQ answers can all live in this one file. Shops that sell technical products such as espresso machines or bicycle parts usually get the most out of it, since their customers ask detailed questions.

Markdown versions of key pages

Clean Markdown copies of product, collection, and blog pages round out the picture. They let AI systems read the content without wading through theme code. Shopify does not produce these copies itself, so most merchants turn to an app to generate them and keep them current.

How to Add llms.txt to the Root Directory in Shopify

Shopify still does not allow direct uploads to the root of a domain. What has changed is that a theme can now render a template at the llms.txt address, which produces exactly the same result for visitors and AI agents. The steps below follow the desktop admin, although the Shopify mobile app uses a very similar path.

Checking what the store serves now

A quick look comes first. Opening yourstore.com/llms.txt and yourstore.com/agents.md in a browser shows exactly what the store is serving. Identical generic Shopify text on both pages means the store is on the managed default, as most shops are. A redirect to some unfamiliar address usually points to an old app or a leftover URL redirect, and clearing that out first avoids a conflict with the native route.

Opening the theme code editor

The template has to sit in the live theme, which means a visit to the theme editor. In the admin, the route is Online Store followed by Themes. A small menu with three dots appears next to the current theme, and Edit code, tucked inside it, opens every folder in the theme. Our habit is to duplicate the theme before changing anything, because a backup takes seconds and can save a lot of stress.

Code editor displaying source code on a laptop

Creating the llms.txt.liquid template

Inside the editor, the Templates folder accepts new files. Right-clicking it brings up New File, and the name has to be exactly "llms.txt.liquid". JSON templates are not accepted for this path, so the .liquid ending is required. As soon as the file is saved, Shopify begins serving it from the primary domain, with no locale or Shopify Markets prefix.

A merchant who prefers all three discovery files to share the same content can create agents.md.liquid instead. That template controls agents.md and, by default, also feeds llms.txt and llms-full.txt, which saves a good deal of duplicate editing.

Writing the file content

Plain text, Markdown, and Liquid are all allowed inside the template, although Liquid is limited to two objects: request and agents. Many objects that theme developers rely on, such as shops or collections, simply will not load. The agents object provides a few handy values, including the store name, store URL, and sitemap URL, while the remaining text is entered by hand. A small ceramics brand might begin with something like this:

# {{ agents.store_name }}
> Handmade ceramic dinnerware and mugs, fired in small batches in Portland and shipped across the US and Canada.
## Collections
* [Dinner plates]({{ agents.store_url }}/collections/plates): Stoneware plates in six glazes.
## More
* [Sitemap]({{ agents.sitemap_url }})

Each line in the sample is short and sticks to facts. The descriptions read like answers to questions a customer might ask, which is the kind of text an AI assistant can lift directly into its own summary of the store.

Early versions of the file often trip over the same problems. A merchant pastes in the entire catalog, and what should be a quick summary runs to thousands of words. Another fills the page with "premium quality" and "unbeatable prices," giving an AI system nothing specific to pass on.

Links to pages behind a password, unpublished collections, and sale pages from several seasons back also appear more often than one would guess. A line earns its place only when it answers something a real shopper would ask or leads to a page that does.

Testing and maintaining the file

With the template saved, yourstore.com/llms.txt should show the new content as plain, unstyled text. Every link is worth one test click, as a dead URL strands an AI agent. From there, the file needs a glance whenever collections, prices, or policies shift, and a reminder at the start of each season suits most small shops.

Editing by hand is manageable while a store has a few dozen pages. As the catalog grows and new articles go up every week, keeping several files in sync turns into one more task that slips through the cracks. Fiidom AEO was built for that situation. The app generates and manages llms.txt, llms-full.txt, agents.md, and AI-friendly Markdown files, so ChatGPT, Claude, Gemini, Perplexity, and other AI systems can make sense of the store.

Its Markdown copies refresh automatically when content changes, and every product receives an AI Readiness score across Shopify Catalog, AI content, and SEO, which makes weak listings easy to find and fix with AI in a few clicks. Merchants can also check Shopify Catalog eligibility and bulk optimize collections, blog posts, and pages, keeping the whole store clear and on brand.

Install Fiidom

>> Read more:

Conclusion

Learning how to add llms.txt to a Shopify store no longer involves redirects, proxy apps, or a developer on standby. Shopify already serves a default file, and one template, either llms.txt.liquid or agents.md.liquid, is all it takes to replace the boilerplate with information that is genuinely useful.

Search rankings will stay where they are, since the file plays no part in them. It does its best work as one piece of a broader set of AI-friendly files for Shopify store owners, alongside agents.md, llms-full.txt, and clean Markdown pages. Backed by accurate product content and regular updates, a thoughtful llms.txt gives AI assistants an honest picture of the store, and that picture is what they draw on when they describe it to shoppers.

FAQ

Can I upload llms.txt to the Shopify Files section instead?

Not in a way that works well. An upload to Files lands at a Shopify CDN address, which is not the domain root. Some older tutorials added a URL redirect on top, but Shopify now answers the llms.txt address itself, and the redirect trick fails more often than it succeeds. A theme template is the method Shopify supports.

Should I edit llms.txt.liquid or agents.md.liquid?

In most cases, agents.md.liquid is the better place to start, because it updates agents.md, llms.txt, and llms-full.txt in one go. A separate llms.txt.liquid template is only worth adding when the llms.txt address needs to say something different.

How often should a Shopify llms.txt file be updated?

Any change to collections, prices, or store policies is a good moment to reread it. Plenty of merchants also check the file once a season, catching broken links and stale descriptions before an AI agent runs into them.