Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Staging site indexed by Google: how to find and remove it

SEO-300High impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

A staging or dev site is a private copy of your website used to test changes before they go live. It often lives on a subdomain such as staging.example.com or dev.example.com, or on a host-provided address such as yourbrand.staging.host.com.

If nothing stops search engines, Google can find that copy through a link, a sitemap, a shared URL or a crawl of the DNS records, then index it. Indexed means the pages are stored by Google and can appear in search results.

Why it costs you leads or sales

The staging copy has the same content as your live site. Google must choose which version to show, and it may pick the wrong one. The result can be lost rankings, split link signals and the wrong page in front of buyers.

Visitors who click a staging result may meet a broken form, a test checkout, placeholder content or a login wall. Forms there often post to nowhere, so the lead is lost. Tracking on staging can also send test events into your live analytics and ad accounts.

How a staging result loses a lead
  1. SearchBuyer searches for your service or brand
  2. Staging resultGoogle shows staging.example.com
  3. Test formForm is disabled or sends to a test inbox
  4. LeadNever reaches your CRM

The visitor lands on the test copy and the journey ends before any lead reaches your CRM.

Where search clicks can go when both versions are indexedExample numbers
Where search clicks can go when both versions are indexed (example)Live site: 70 % of clicks; Staging copy: 30 % of clicks027547030Live siteStaging copy% of clicks

Example: illustrative split only. Real numbers depend on which version Google prefers for each query.

How to check if your site has it

Find indexed staging URLs
  1. Search by hostname

    In Google, search site:staging.example.com. Repeat for dev., test., beta., preview. and any host-provided test address you use. Any results mean it is indexed.

  2. Search for your content on other hosts

    Search a distinctive sentence from your homepage in quotes. If a second domain appears, that is a copy.

  3. Check Search Console

    Add the staging host as its own property if you can verify it. Open Pages (Indexing) and see what is indexed. Also check your live property for 'Duplicate, Google chose different canonical than user' entries that point to staging.

  4. Test the response

    Open the staging URL in a private window. If it loads without a login, it is public. Check the page source for noindex.

How to fix it

Order matters. If you block crawling with robots.txt first, Google cannot see a noindex tag, and URLs can stay listed. Use a password so the pages return a login response instead, then clear the old entries.

Block staging by platform
  1. Set the visibility option

    On staging go to Settings > Reading and tick 'Discourage search engines from indexing this site'. This adds noindex. Treat it as a backup only.

  2. Add a password

    Use your host's staging tool (many hosts offer a password option for staging sites) or add HTTP authentication at server level.

  3. Check the SEO plugin

    If you use an SEO plugin, confirm its own noindex setting is not overridden for pages or post types.

nginx: password plus noindex header on stagingnginx
server {
  server_name staging.example.com;
  auth_basic "Restricted";
  auth_basic_user_file /etc/nginx/.htpasswd;
  add_header X-Robots-Tag "noindex, nofollow" always;
}
Apache .htaccess: password plus noindex headerhtaccess
AuthType Basic
AuthName "Restricted"
AuthUserFile /path/to/.htpasswd
Require valid-user

Header set X-Robots-Tag "noindex, nofollow"
Clear what is already indexed
  1. Verify the staging host

    Add it as a Domain or URL-prefix property in Search Console. You need to verify it, which may need a DNS record rather than a file if the site is password protected.

  2. Request removal

    Open Removals and choose New request. Remove all URLs with this prefix. This hides them temporarily, for about six months.

  3. Make the removal permanent

    Keep the password in place. Once Google recrawls and gets a 401 or 403, or a 404/410, the URLs drop out over time.

  4. Fix any live pages that point to staging

    Search your live site for the staging hostname in links, canonical tags and sitemaps and replace them with live URLs.

How to confirm it's fixed

Confirmation checklist
  • Opening the staging URL in a private window asks for a password.
  • curl -I https://staging.example.com returns 401 or 403.
  • The URL Inspection tool in Search Console no longer shows staging pages as indexed.
  • site:staging.example.com returns no results after a few weeks.
  • Your live pages show their own URL as the canonical in the page source.
  • No live sitemap, link or canonical tag mentions the staging hostname.
Quick header checkbash
curl -I https://staging.example.com/
# Expect: HTTP/2 401 (or 403)

How to prevent it happening again

Prevention habits
  • Password protect every non-production environment from the day it is created.
  • Never copy the staging noindex setting to production, and never copy production settings that allow indexing to staging.
  • Keep staging URLs out of live sitemaps, emails and public chat messages.
  • Add a launch checklist step to confirm the environment's robots and password settings after each clone or migration.
  • Use a different analytics property or disabled tracking on staging.
  • Review site: searches for your test hostnames each month.

How FunnelGuard handles this

FunnelGuard does not check for this yet. Spotting an indexed staging site is a possible future check, so for now you need to watch for it another way.

What FunnelGuard does cover nearby: a robot visitor runs your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and checks each step, the tracking hits sent to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a broken step or lost tracking is caused by a bad migration or launch, you may see it there, but that is not the same as detecting an indexed staging site.

To watch for staging indexing yourself, run the site: searches above each month, keep Search Console email alerts on, and check the Pages report after any migration or clone. A free read-only website audit is also available from FunnelGuard.

Questions people ask

Why is my staging site showing up in Google?

Google found the staging URL through a link, sitemap, shared address or DNS record, and nothing told it to stay out. If the site has no password and no noindex, Google can crawl and list it like any public site.

How do I remove a staging site from Google search results?

Put the staging site behind a password, then verify it in Search Console and use Removals to request removal of all URLs with that prefix. Keep the password in place so Google gets a 401 or 403 on the next crawl and the pages drop out.

Is noindex enough to keep a staging site out of Google?

It helps, but it is not enough alone. A noindex tag only works if Google can crawl the page, and it is easy to copy to or from live by mistake. A password is the reliable fix, with noindex as a second layer.

Does a robots.txt Disallow remove a staging site from Google?

No. A Disallow rule blocks crawling, not indexing, so URLs can stay listed if other pages link to them. Google also cannot see a noindex tag on a page it is blocked from fetching.

Can a staging site hurt my live site's rankings?

Yes. It can create duplicate content, split links and signals between two hosts, and cause Google to show the staging URL instead of the live one. Fixing it usually returns the live page as the main result.

How do I check if my dev site is indexed?

Search site:dev.example.com in Google, replacing it with your own hostname. You can also inspect a URL in Search Console or search a unique sentence from your site in quotes to find copies on other hosts.

How long does it take for staging URLs to disappear from Google?

A Search Console removal request hides them within about a day, but the hiding is temporary. Permanent removal depends on Google recrawling the pages and seeing the password or a 404, which can take days to weeks.

Can FunnelGuard tell me if my staging site is indexed?

Not yet. It is a possible future check. Today FunnelGuard monitors journeys, tracking hits and lead delivery, so use site: searches and Search Console to watch for staging indexing.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.