WordPress
WordPress staging site indexed by Google: fix it
Stop a public WordPress staging site appearing in Google with the Reading setting that adds a robots noindex tag.
A public WordPress staging site is indexable when "Discourage search engines from indexing this site" is unchecked, while WP Engine staging may already block bots. Check the exact staging URL first, enable the setting under "Settings > Reading," save, then confirm the page source contains the robots noindex tag.
Why WordPress does this
A public WordPress staging site remains indexable when Settings > Reading > "Search Engine Visibility" leaves "Discourage search engines from indexing this site" unchecked. WordPress documents that checking it adds noindex to the robots meta tag when the theme uses wp_head. WP Engine is an exception: its default environment.wpengine.com staging domains already block bots through a virtual robots.txt file.
Check it right now
Before changing anything, confirm what a crawler actually sees. The check is free, takes one URL and needs no account.
How to fix it
- Run the indexability checker on the exact staging URL first. If it is a default environment.wpengine.com address, inspect its robots.txt too; WP Engine says that host is blocked already.
- For an unprotected public staging site, sign in to its WordPress administration screen and open Settings > Reading.
- Under "Search Engine Visibility", check "Discourage search engines from indexing this site", then click "Save Changes".
- Run the indexability checker again and confirm the staging page now returns a robots noindex directive. If it does not, check that the theme calls wp_head, which WordPress names as a requirement.
- If Google already shows the staging host, use Search Console > Removals > Temporary Removals > New Request for the staging prefix after noindex is present. Google says the request is temporary, so keep the WordPress setting on.
Why it happens again
WordPress stores this as the per-site blog_public option. Every separately installed or copied staging site needs its own check, even when another environment is configured correctly.
stillindexed re-checks the URLs you give it every 30 minutes on Starter and alerts when a directive changes, at most 30 minutes after it does. It is a monitor rather than a crawler: it watches a list you choose and tells you when one of seven things changes. Card first, no trial, and a 30 day refund.
Catching it next time
Fixing it once is the easy half. The setting that caused this can be changed again by anyone with access, and the page will keep returning 200 while it happens.
Other ways WordPress loses pages
- Every page on the site vanished from Google, and the last thing anyone touched was the WordPress dashboard.
- my WordPress robots.txt is blocking pages that should be crawled
- A WordPress page's canonical tag points at the wrong URL, usually because two SEO plugins, a theme or a code filter disagree about who writes it.
- my WordPress migration lost pages from search
- The http, www or non-www version of a WordPress site takes an extra hop before reaching the final URL, because the host and WordPress each redirect once.
A staging or preview site indexed by Google, on other platforms
Sources
Every claim about WordPress above is from their own documentation, read on 2026-08-30. Platforms change their settings; if one of these is out of date, their page wins and we would like to know.