Frontend Robots Icon

Frontend Robots 

Accidentally indexed staging environments are a common and expensive problem: duplicate content competing with the live site, internal drafts surfacing in search results, and clean-up work that takes weeks. This indicator signals the environment to crawlers so non-production content does not end up in search engines in the first place.

It adds an X-Robots-Tag header to every frontend response:

X-Robots-Tag: noindex, nofollow
Copied!
Browser devtools network panel showing the X-Robots-Tag response header

You can register the indicator in your ext_localconf.php:

ext_localconf.php
use KonradMichalik\Typo3EnvironmentIndicator\Configuration\Handler;
use KonradMichalik\Typo3EnvironmentIndicator\Configuration\Indicator;
use KonradMichalik\Typo3EnvironmentIndicator\Configuration\Trigger;

Handler::addIndicator(
    triggers: [
        new Trigger\ApplicationContext('Testing/Staging')
    ],
    indicators: [
        new Indicator\Frontend\Robots()
    ]
);
Copied!

Additional optional configuration keys:

  • content (string): The header value. Default is noindex, nofollow. A value that is not valid per 9110 is ignored and logged as a warning.

The X-Robots-Tag header can be disabled globally via the extension configuration.