Stack Matrix Hub (8)
X-Robots-Tag Noindex, Robots & HTTP Basic Auth Staging Shield
Keep Googlebot, AI scrapers, and public visitors out of staging clones without burning PHP workers on WordPress login redirects.
0 PHP workers burned · Edge HTTP 401 Basic Auth · Strict X-Robots-Tag header
Why WordPress blog_public=0 Alone Is Too Weak
Checking "Discourage search engines" only outputs a meta tag and a soft robots.txt rule after WordPress boots PHP. Bots still hit the staging clone, consume PHP workers, and index pages if external links point to the staging subdomain.
Server-Level Basic Auth + X-Robots-Tag Headers
Enforce HTTP Basic Auth in .htaccess or Nginx before requests reach index.php, paired with Header always set X-Robots-Tag "noindex, nofollow, noarchive". Unauthenticated scanners receive an immediate 401 at zero PHP RAM cost.
Measured Thresholds & Configuration
| Protection Layer | Execution Tier | PHP Worker Cost | Search Index Protection |
|---|---|---|---|
| WP Reading blog_public=0 | PHP / WordPress | Full PHP boot per hit | Weak (links still indexed) |
| HTTP Basic Auth + X-Robots-Tag | Apache / LiteSpeed / Nginx | 0 PHP workers (401 edge) | Complete crawl & index block |