Help for owners
Google shows my test copy of the website to customers
Short answer
Hide the test copy quickly with the Removals tool in Search Console, then put a password on it, or a noindex rule, so it stays out of Google for good. Google says robots.txt does not keep a URL out of its results, and a temporary removal lasts only about six months, so the removal alone is never the whole fix.
Does this sound like your situation?
- Searching my business name shows an address starting with staging, dev or test next to my real site.
- A customer tried to order, book or log in on the test copy.
- Google lists two versions of my pages with the same text.
- The public can see old offers, fake products or unfinished pages from the test site.
- My developer blocked the test site in robots.txt, yet it still shows in results.
Why does this happen?
The test copy is open to anyone who finds it
Search Console Help says Google can index any address it finds unless the page carries a noindex rule or has been temporarily blocked. Google finds addresses in many ways, including a single link from another website, so a test copy with no login can end up listed.
Confirmed by support.google.com
Robots.txt was used to hide it
Google states that robots.txt, a plain text file of crawling rules at the root of a site, is not a way to keep a page out of Google. If other pages link to a blocked address, Google can still list the address itself, shown without a description.
Confirmed by developers.google.com
The noindex rule is hidden behind the block
Noindex, an instruction in the page or in the server's reply that says do not list this page, only works when Google is allowed to fetch the page. If robots.txt also blocks the test site, Google never reads the rule, and the address can stay in results.
Confirmed by developers.google.com
Google sees the test copy as a twin of your real pages
While indexing, Google groups pages with similar content found anywhere on the web and picks one of them as the version it may show. A near-identical test copy joins that group with your live pages.
Confirmed by developers.google.com
What can I do about it today?
- Write down the test addresses Google showsSearch for site: followed by the test address, for example site:staging.example.com, and copy each result. You need the exact addresses for the next steps.
- Check that your Search Console covers the test addressA Domain property for your main domain already includes its subdomains, such as staging. If you only have a property for your www address, add one for the test address and complete the ownership check.
- File a temporary removal for the test address onlyIn the Removals tool, open the Temporary Removals tab, click New Request, choose Temporarily remove URL and then Remove all URLs with this prefix. Type the full test address with https at the start and a slash at the end. Read it twice before you send it: your main address in that box would hide the whole live site.
- Ask your developer for a password on the test siteGoogle says a password keeps private content out of its search results, and that content already listed will eventually drop out. Where a password is not possible, a noindex rule is the fallback, as long as robots.txt does not block the same pages.
- Find anyone who used the test copyAsk your developer whether orders, bookings, sign-ups or messages were made on the test site. Those people think they dealt with you, so contact them from your real site and email address.
When should I bring someone in?
- Customers paid, booked or entered personal details on the test copy.
- Nobody knows who controls the test address, its hosting or its domain.
- Your removal request was denied, or the test pages returned after the removal period ended.
How do I handle it?
- Find every public copyStaging, dev, preview and old demo addresses, plus any copy reachable by the server's IP address. I check each one with site: searches and in Search Console, so none is missed.
- Put a login in front of each copyOn nginx I require a username and password for the whole test host, so search engines and strangers both meet a closed door. A request for a test page then answers with 401, which Search Console reports as Blocked due to unauthorized request (401).
- Use noindex where a login cannot goFor a preview a client must open without a password, the server sends an X-Robots-Tag noindex header on every response, and robots.txt is left open so Google can read it.
- Request the temporary removal and follow itI file the prefix request for the test host only, confirm it was approved, and keep the permanent block in place well past the removal period.
- Stop the next copy from leakingNew test environments start locked, and the canonical tags in the code use full addresses, which Google advises partly because relative ones cause trouble if a testing site gets crawled. At launch I check that the live site has not inherited the test lock or its noindex.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Is a robots.txt block on the test site enough?
No. Google says robots.txt manages crawling and does not keep pages out of its results. A blocked address can still be listed, without a description, if other pages link to it.
How long does the Removals tool hide the test site?
About six months for a successful request. Google says the request usually takes up to a day to process and may be refused. Afterwards the pages can return unless a password, a noindex rule or deletion makes the removal permanent.
Can a removal for the test site hide my real site?
Only if the wrong address is entered. Google's notes say a request for a staging subdomain does not cover www or the main domain, and other subdomains do not match. A request for your main address with the prefix option would cover the whole live site.
Why does the test site still show after I added a password?
Google has to visit the address again to see the change. Google says password protection makes listed content drop out of results eventually, which is why a temporary removal is filed at the same time.
Sources
- Search Console Help: Page indexing report
- Google Search Central: Introduction to robots.txt
- Google Search Central: Block Search indexing with noindex
- Google Search Central: In-depth guide to how Google Search works
- Google Search Central: Control what you share with Google
- Search Console Help: Removals and SafeSearch reports tool
- Google Search Central: Remove a page hosted on your site from Google
- Search Console Help: Add a website property
- Google Search Central: site: search operator
- Google Search Central: How to specify a canonical URL
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
Related help
- An old address on my domain, like shop. or promo., now shows pages I never madeAn old subdomain shows someone else's site when its DNS record still points at a cloud or hosting service you closed, and another person has claimed that service name.
- Google Ads flagged my website for malicious software or a compromised siteIt means Google found the site your ads lead to hacked or carrying malware, and the label sets the outcome.
- My website opens for me but customers say it does notA site can work for you and fail for others because of caching, DNS changes that have not reached everyone, a certificate problem, or a block based on country or network.
- Chrome shows a red warning page when people open my websiteChrome uses Google's Safe Browsing to warn people before they open sites suspected of malware, hacking or phishing.