The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
611 Ready
479 Need Help
๐Ÿ† Leaderboard
Actively Maintained v3.0.0

Angeo Robots.txt AEO

angeo/module-robots-txt-aeo

Injects AI crawler rules for bots like GPTBot, ClaudeBot, PerplexityBot, and Google-Extended into Magento 2 robots.txt without overwriting existing configuration, with audit-clean output, a dedicated cache type, and a read-only API for cross-module integration.

7
Downloads
Below average
5
GitHub Stars
Below average
3d ago
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
โ€“ DI Compile
โ€“ Templates

Code Quality

CS Coding Standard
L1 PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v3.0.0 on Magento 2.4.9
Jun 14, 2026
v2.0.0 on Magento 2.4.9
Jun 7, 2026
v1.0.0 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Angeo Robots.txt AEO Magento compatibility status badge

README

Loaded from GitHub

Angeo Robots.txt AEO โ€” AI Crawler Rules for Magento 2

Injects AI crawler rules into your Magento 2 robots.txt โ€” without overwriting your existing configuration.

Bots managed out-of-the-box: OAI-SearchBot, GPTBot, ChatGPT-User, PerplexityBot, Perplexity-User, Google-Extended, ClaudeBot, anthropic-ai, Claude-User, Applebot, cohere-ai, Amazonbot, Meta-ExternalAgent.

Fixes the "robots.txt โ€” AI Bot Access" signal in angeo/module-aeo-audit.


What's new in 2.0

  • 5 new built-in bots aligned with the AEO Audit v3 catalogue: Claude-User, Applebot, cohere-ai, Amazonbot, Meta-ExternalAgent. An out-of-the-box install now passes the AEO Audit's robots_txt check.
  • Audit-clean output โ€” emitted robots.txt no longer triggers syntax warnings:
    • Crawl-delay suppressed on bots that ignore it (GPTBot, ClaudeBot, Google-Extended).
    • No Allow: / + Disallow: / conflict on the same agent.
    • Versioned UAs sanitised at the catalogue layer.
    • Sitemap URLs upgraded to https:// when the store base URL is HTTPS.
  • Api\RobotsStatusInterface โ€” public read-only API for cross-module integration. Consumers like angeo/module-aeo-audit can wire to it and skip the HTTP round-trip.
  • Dedicated cache type angeo_robots_txt_aeo โ€” flush in isolation from System โ†’ Cache Management.
  • Backend validation โ€” PathList and CrawlDelay backend models normalise admin input on save.
  • CSP-clean admin UI โ€” no inline styles, no inline scripts.
  • i18n/en_US.csv โ€” admin labels are translatable.
  • Removed runtime remote-registry feature โ€” bot catalogue is now release-managed only. Dynamic catalogue injection from an external endpoint was a security trade-off (anyone with the endpoint could inject UA strings into every install's robots.txt) and a half-implemented UX one (added bots had no admin checkbox). New bots ship via module releases.
  • Removed orphan code โ€” the unused RemoteRegistryUpdater triplet from 1.x is gone.

See CHANGELOG.md for the full list.


How it works

The module intercepts the robots.txt response at render time via a plugin on Magento\Robots\Model\Robots::getData() and prepends a managed block of AI bot rules. No database writes. No filesystem changes. Your existing admin config is untouched.

Inject mode (default โ€” recommended)

# Angeo AEO โ€” AI Crawler Rules
# https://angeo.dev | module-robots-txt-aeo
# Do not edit this block manually โ€” manage via Stores > Config > Angeo > Robots.txt AEO

User-agent: OAI-SearchBot
Allow: /

User-agent: GPTBot
Allow: /

User-agent: ClaudeBot
Allow: /
Disallow: /admin/

User-agent: Claude-User
Allow: /

User-agent: Applebot
Allow: /

# End Angeo AEO block

User-agent: *
Disallow: /checkout/
... (your existing rules follow unchanged)

# Angeo AEO โ€” Sitemaps
Sitemap: https://example-store.com/sitemap.xml
# End Angeo AEO sitemaps

Replace mode

Regenerates the full robots.txt. Preserves your custom Disallow rules from the existing wildcard block. Use only if you want this module to own the entire file.


Installation

composer require angeo/module-robots-txt-aeo
bin/magento module:enable Angeo_RobotsTxtAeo
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush

That's it. The module is enabled with sensible defaults โ€” all 10 mainstream AI bots are allowed; the 3 lower-traffic bots (cohere-ai, Amazonbot, Meta-ExternalAgent) are catalogued but disabled by default.


Configuration

Stores โ†’ Configuration โ†’ Angeo โ†’ Robots.txt AEO

Section Purpose
General Enable/disable, choose Inject or Replace mode
AI Crawlers Tick which bots to allow. Bots marked โ˜… are critical for AEO Audit pass
AI Crawler Path Overrides Per-bot Allow:, Disallow:, Crawl-delay:
Sitemap Directive Auto-detect from Magento_Sitemap, manual list, or none
Live Preview Renders the AEO block that will be injected

All settings respect store scope โ€” multi-store installs can configure each store independently.


CLI

# Render what would be emitted, without applying it
bin/magento angeo:robots:preview [--store=N]

# Fetch the live robots.txt and check enabled bot rules are present
bin/magento angeo:robots:validate [--store=N] [--insecure]

validate exits non-zero when expected bot rules are missing from the live file โ€” useful in post-deploy smoke tests:

# .github/workflows/post-deploy.yml
- run: bin/magento angeo:robots:validate

For a full AEO scoring of robots.txt (critical-bot checks, syntax warnings, sitemap quality) install angeo/module-aeo-audit. It reads the effective output of this module via Api\RobotsStatusInterface โ€” no HTTP round-trip when both modules are installed.


Cross-module integration (Api\RobotsStatusInterface)

The module exposes a public read-only API that consumer modules can wire to via DI. Soft-coupling pattern โ€” consumers interface_exists()-check before declaring the dependency, so they keep working when this module is not installed.

use Angeo\RobotsTxtAeo\Api\RobotsStatusInterface;

class MyChecker
{
    public function __construct(
        private readonly ?RobotsStatusInterface $robotsStatus = null,
    ) {}

    public function check(int $storeId): void
    {
        if ($this->robotsStatus !== null) {
            // Zero-overhead โ€” pure in-process call
            $effective = $this->robotsStatus->getEffectiveRobotsTxt($storeId);
            $bots      = $this->robotsStatus->getEnabledBotUserAgents($storeId);
            // ...
        } else {
            // Fall back to HTTP fetch
        }
    }
}

Used by angeo/module-aeo-audit v3+ when both modules are installed.


How robots.txt manual content interacts

The module's admin form (Inject mode) does not modify the existing Magento admin robots.txt textarea (Content โ†’ Design โ†’ Configuration โ†’ Edit Custom instruction of robots.txt). Both sources coexist:

  • Your custom block is preserved untouched.
  • The AEO block is prepended at render time.
  • Re-running the plugin is idempotent โ€” the AEO block is replaced, not stacked.

If you'd rather manage AI bot rules yourself, either disable the module (bin/magento module:disable Angeo_RobotsTxtAeo) or untick individual bots in admin.


Compatibility

Status
Magento 2.4.6 (PHP 8.1) โœ…
Magento 2.4.7 (PHP 8.2 / 8.3) โœ…
Magento 2.4.8 (PHP 8.3 / 8.4) โœ…
Magento Open Source / Commerce / Cloud โœ…
Hyvรค / PWA Studio โœ… (robots.txt is server-side)
Multi-store / multi-website โœ…
Magento_Sitemap not installed โœ… (soft dependency, no-op resolver)
Varnish / Fastly โš ๏ธ purge CDN cache after config changes

License

MIT. See LICENSE.

Security

See SECURITY.md for the disclosure policy.

Contributing

See CONTRIBUTING.md.

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.