Why does Astro NoIndex exist?
Because accidental indexing of staging and preview sites causes real SEO damage and is difficult to reverse.
Clear answers explaining how Astro NoIndex enforces noindex rules safely and deterministically.
Last Updated: 01 April 2026
Because accidental indexing of staging and preview sites causes real SEO damage and is difficult to reverse.
Only exact hostnames listed in the allow array are permitted to be indexed. All others receive noindex directives.
If the site hostname cannot be determined, astro-noindex applies noindex by default.
astro-noindex respects explicit user intent and does not modify pages that already include a robots meta tag.
No. It performs static HTML mutation at build time only.
Yes. The output is static, cache-safe, and works behind any CDN.
Only if the production hostname is not explicitly allow-listed.
Yes. Astro NoIndex is released under the MIT license.
Need to prevent accidental indexing of non-production sites?