Classify what the preview contains
A preview site may contain unpublished marketing copy, private customer examples, or merely a duplicate of public content. Those cases need different access decisions. Google's noindex documentation describes search exclusion, not confidentiality. If material must not be public, use authentication or another real access boundary. A noindex tag does not stop someone who knows the URL from visiting. Start by asking who should be able to access the preview, then decide how supporting search engines should treat any content that remains publicly reachable.
Separate environment configuration
Avoid storing a preview exclusion directive in a shared article template without an explicit environment decision. The same code may later be deployed to production. Define a clear production hostname and a separate preview policy, then make the build or response layer apply the intended behavior. Inspect HTTP headers as well as HTML metadata because an upstream rule can add an exclusion even when the template looks correct. Keep the ownership clear: if the hosting platform supplies the preview rule, the application should not independently guess at the same state.
A hypothetical launch mistake
A team develops its new blog on preview.example.com with noindex enabled. It later assigns example.com to the same deployment but forgets to change an environment flag. The homepage looks polished, all articles load, and the sitemap is valid, yet production pages still carry the preview instruction. A launch check that fetches the public hostname and inspects both headers and document metadata catches this failure. Checking only the source repository would not be enough because the active environment value determines the deployed response.
Build a two-sided launch check
Test one preview URL and one production URL side by side. Confirm that each follows its intended access and indexing policy. Add a representative article and a category page to avoid assuming the homepage's behavior applies everywhere. Verify canonical hostnames, absolute asset addresses, and social metadata too, since preview domains can leak through several fields. Keep these checks in the deployment process so changing custom domains or hosting settings prompts another inspection. The goal is to demonstrate the actual public behavior, not merely mark a configuration task complete.
Handle accidental exposure methodically
If a preview was publicly indexed, first resolve the access or indexing policy for the content involved. Preserve evidence of the current response and use the search platform's relevant removal workflow where appropriate. Do not delete production indexing controls in a panic or block crawling in a way that hides a needed noindex instruction. For confidential exposure, treat access protection as the primary repair. Search reports may lag behind deployment changes, so verify the live response independently. A stable environment policy prevents the same mistake from returning with the next redesign or branch preview.
Assign someone to remove obsolete preview deployments. Even correctly excluded environments can confuse reviewers and customers if several public-looking versions of the site remain accessible after a launch.
Protect previews appropriately and verify that production receives its own intentional indexing configuration.
Sources & further reading
Official documentation informs this guide. Examples are illustrative, and product interfaces or limits can change.
From search signals to a useful first draft.
SERP.so is in development. Join the waitlist for a workspace that connects research, content review, and publishing.
Join early access ↗