Search by

infrangible / m2-ai-visibility

infrangible

Makes the shop visible to AI assistants and AI search: llms.txt, Markdown versions of product, category and CMS pages, rules for AI crawlers in robots.txt and IndexNow notifications.

Package info

github.com/infrangible-dev/m2-ai-visibility

Homepage

Type:magento2-module

pkg:composer/infrangible/m2-ai-visibility

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.1.0 2026-12-01 09:21 UTC

This package is auto-updated.

Last update: 2026-12-01 09:23:31 UTC


README

Makes the shop visible to AI assistants and AI search engines (ChatGPT, Claude, Perplexity, Copilot, Google AI Overviews), also known as GEO (generative engine optimization): a summary of the shop for language models (/llms.txt), Markdown versions of product, category and CMS pages, rules for AI crawlers in robots.txt and IndexNow notifications of changed pages.

llms.txt

/llms.txt follows the format of llmstxt.org: the name of the store as heading, its description as quote, then link lists with a short description per entry:

  • Categories: the active categories of the menu, main categories with their subcategories.
  • Products: the newest enabled and visible products, up to the configured number (100 by default).
  • Pages: the active CMS pages, without the pages for missing pages and for blocked cookies. The home page links to the base URL of the store.

/llms-full.txt contains the same pages with their content as Markdown (descriptions and CMS blocks of categories, the content of the Markdown versions of products, content of CMS pages with widgets and directives processed). Both files are kept in Magento's cache and rebuilt when a product, category, CMS page or CMS block is saved or deleted or the settings of the module are saved, at the latest after a day.

Markdown pages

Products, categories and CMS pages are available as Markdown at their URL with .md, for example /joust-duffle-bag.html.md:

  • Products: name, SKU, price (from the lowest price for composite products), availability, the attributes shown on the product page and the additional attributes of the settings, image, short description and description.
  • Categories: name, description, the content of the CMS block of the category (display modes with block) and the newest products of the category with links (not for "Static block only").
  • CMS pages: heading and content.

The HTML pages link to their Markdown version with <link rel="alternate" type="text/markdown">. The Markdown versions send a canonical link (Link header) to the HTML page, so search engines index the HTML page. Only pages with a URL rewrite of the store have a Markdown version; disabled or invisible products, inactive categories and pages, and pages of other stores give a 404.

Magento's VCL for Varnish removes the Link header of all responses. The module changes the VCL that Magento generates (bin/magento varnish:vcl:generate and the export in the admin) so that it keeps the header of Markdown responses; generate the VCL again and load it into Varnish after installing the module. A VCL written by hand needs the same change:

if (resp.http.Content-Type !~ "^text/markdown") {
    unset resp.http.Link;
}

Product descriptions

Products without meta description, short description and description get their description in llms.txt, llms-full.txt and their Markdown version from other modules: the module dispatches the event infrangible_aivisibility_product_description with the product (product) and a transport object (transport) whose description an observer sets. Infrangible Catalog SEO answers with the text of its template "Product Meta Description".

AI crawlers in robots.txt

Rules for three groups of AI crawlers are added to the robots.txt of Magento, per store view "Allow", "Block" or "Not Set" (no rule, the crawlers follow the rules for all user agents):

  • Training of AI models: GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Bytespider, meta-externalagent.
  • AI search: OAI-SearchBot, Claude-SearchBot, PerplexityBot.
  • User requests: ChatGPT-User, Claude-User, Perplexity-User.

Further lines (for example for other crawlers) can be added as they are. Blocking the training crawlers while allowing AI search and user requests keeps the shop in AI answers without giving its content to model training.

IndexNow

When a product, category or CMS page is saved, it is queued in the table infrangible_aivisibility_indexnow. A cron job sends the URLs of the queued pages every 10 minutes to IndexNow, which shares them with Bing (and so Copilot and ChatGPT search), Yandex, Seznam and Naver. One URL per store view with IndexNow is sent: the URL of the page without category path. The key is generated when the setting is saved empty, and the shop shows it at /<key>.txt, where IndexNow checks it. The result of each entry (sent, failed with the answer of IndexNow, or skipped without URL) is kept for 30 days; each request is also written to the system log.

Configuration

Stores > Configuration > Infrangible Solutions > AI Visibility:

  • llms.txt: Enable, llms-full.txt, Description (empty for the default meta description), Number of Products. On by default.
  • AI Crawlers: Training of AI Models, AI Search, User Requests, Further Rules. Not set by default.
  • Markdown Pages: Enable, Additional Attributes. On by default.
  • IndexNow: Enable, Key. Off by default.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.6 or newer
  • PHP 8.1 or newer, with the extensions dom, libxml and mbstring
  • Magento's cron for IndexNow
  • Any theme: the module does not change templates. The web server must pass /llms.txt, /llms-full.txt, the key file and URLs ending with .md to Magento if they do not exist as files, as the nginx and Apache configurations of Magento do.

Installation

composer require infrangible/m2-ai-visibility
bin/magento module:enable Infrangible_AiVisibility
bin/magento setup:upgrade
bin/magento cache:flush

In production mode, also run bin/magento setup:di:compile.

License

Infrangible AI Visibility is licensed under the MIT License - see the LICENSE file for details.