DEV Community

Cover image for llms.txt for Magento 2: What It Is, Why It Matters, and How to Generate It in 5 Minutes
Ievgenii Gryshkun
Ievgenii Gryshkun

Posted on

llms.txt for Magento 2: What It Is, Why It Matters, and How to Generate It in 5 Minutes

Google has robots.txt. Google has sitemap.xml. Now AI assistants have llms.txt.

If you run a Magento 2 store and haven't heard of llms.txt yet — this post is the 5-minute version of everything you need to know, plus the exact commands to generate it today.


The problem: AI assistants don't crawl like Google does

When Google indexes your store, its crawler visits thousands of pages and builds a picture of your catalog over weeks. It's slow, but it works.

ChatGPT, Claude, and Perplexity operate differently. When a user asks "what's a good blender under $150?", the AI doesn't crawl your store in real time. It works from what it already knows — or from a structured snapshot it can parse in milliseconds.

If you haven't given it that snapshot, it either ignores your store or gets the details wrong: outdated prices, discontinued products, categories that no longer exist.

llms.txt is that snapshot.


What is llms.txt?

llms.txt is a plain-text file hosted at the root of your domain — yourstore.com/llms.txt — that gives AI systems a structured, human-readable summary of your store.

Think of it as a README.md for your entire eCommerce site. It tells AI assistants:

  • What your store sells
  • What categories exist
  • Key product URLs and descriptions
  • CMS pages (shipping, returns, about)
  • Store metadata: name, currency, language

A minimal example looks like this:

# Store: Volta Equipment

## STORE
Name: Volta Equipment
URL: https://voltaequipment.com/
Currency: USD

### CATEGORIES ###
Category ID: 4
Name: Fitness Equipment
URL: https://voltaequipment.com/fitness
Description: Commercial and home gym equipment

### PRODUCTS ###
SKU: VE-KB32
Name: 32kg Kettlebell — Cast Iron
Price: 8900
URL: https://voltaequipment.com/32kg-kettlebell
Short Description: Competition-grade cast iron kettlebell, powder-coated finish

## CMS PAGES
TYPE: PAGE
TITLE: Shipping Policy
URL: https://voltaequipment.com/shipping
Enter fullscreen mode Exit fullscreen mode

Simple. No JSON schema. No special syntax. Just structured plain text that both AI systems and humans can read instantly.


Does llms.txt actually work?

Fair question — and the honest answer is: it depends on the AI.

Some AI systems (Perplexity, some Claude configurations) actively read llms.txt when crawling. Others, like GPTBot, primarily rely on the page content itself and Product schema JSON-LD. OpenAI has not yet published an official spec for llms.txt consumption.

So why generate it at all?

Three reasons:

1. It costs nothing to add. One Composer command and it's live. There's no downside.

2. It's a trust signal. When a Magento developer or agency reviews your AEO setup, a present llms.txt signals you're thinking about AI visibility — and it's one of the 8 signals checked by the AEO audit module.

3. The standard is evolving fast. OpenAI, Anthropic, and Google are all moving toward structured merchant data formats. Stores with llms.txt already in place will require zero additional work when these systems formalize their specs. Stores without it will have to catch up.


llms.txt vs llms.jsonl — what's the difference?

The angeo/module-llms-txt module generates both files. Here's when each matters:

File Format Best for
llms.txt Plain text AI assistants reading store context, Perplexity, Claude
llms.jsonl JSON Lines Structured product data, future ACP integrations, developers

llms.jsonl is the machine-readable sibling — one JSON object per product, per line, compressed for fast parsing. If you're planning to integrate with OpenAI's ACP feed later, llms.jsonl is the stepping stone.

For now, generate both. They serve different consumers.


Installation: 3 commands

composer require angeo/module-llms-txt
bin/magento setup:upgrade
bin/magento cache:flush
Enter fullscreen mode Exit fullscreen mode

That's it. The module is MIT licensed, free on Packagist, and runs entirely on your server.


Generate the files

Option A — CLI (recommended)

bin/magento angeo:llms:generate
Enter fullscreen mode Exit fullscreen mode

This generates both llms.txt and llms.jsonl at your store root and outputs the file paths.

Option B — Magento Admin

Go to Stores → Configuration → General → Angeo → LLMS and trigger manual generation from the backend.

Option C — Cron (for automatic updates)

The module registers a Magento cron job. As long as your server cron is running, the files stay current:

bin/magento cron:run
Enter fullscreen mode Exit fullscreen mode

For stores with frequently changing inventory — new products, price updates, seasonal categories — cron is the right default.


Verify it's live

After generation, open yourstore.com/llms.txt in a browser. You should see your store name, category list, and product entries.

Then run the AEO audit to confirm it passes signal #2:

bin/magento angeo:aeo:audit
Enter fullscreen mode Exit fullscreen mode

Expected output:

✓ PASS  robots.txt — OAI-SearchBot and GPTBot allowed
✓ PASS  llms.txt — store content map present
...
Enter fullscreen mode Exit fullscreen mode

If llms.txt shows FAIL, check that the file exists at pub/llms.txt and that your web server is serving it correctly (not blocked by nginx or a CDN rule).


Multi-store support

If you're running multiple store views or storefronts, the module generates separate llms.txt files per store — each with the correct currency, language, and URL structure. No additional configuration needed.


What to do after llms.txt

llms.txt is AEO signal #2. To complete your AI visibility setup, the remaining signals are:

  1. robots.txt — Allow OAI-SearchBot, GPTBot, ClaudeBot, and 4 others
  2. llms.txt — structured store map ← you are here
  3. Product Schema — JSON-LD with offers.availability on every product page
  4. AI Product Feed — ACP-compliant .jsonl.gz for ChatGPT Shopping registration
  5. FAQPage Schema — structured Q&A for policy pages

Run bin/magento angeo:aeo:audit to see your current score across all 8 signals.


Summary

  • llms.txt gives AI assistants a structured snapshot of your store
  • It's served at yourstore.com/llms.txt — same pattern as robots.txt
  • The angeo/module-llms-txt module generates it automatically, with cron support
  • It takes 3 commands and under 5 minutes to set up
  • It's one of 8 AEO signals that determine your visibility in ChatGPT, Claude, and Perplexity

Free modules used in this post:

Run a free AEO audit on your store →

Top comments (0)