A staging website indexed by Google is a preview address showing up as if it were the public site. Confirm the hostname in the result, then keep that copy out of search with a control that sits only on the preview. Google says that once it crawls a page carrying a noindex rule, it drops that page from Google Search results, even if other sites link to it [1]. Do not put that rule, a robots.txt block, or a password wall on the public hostname.
Confirm you are looking at the temporary copy
Start with the URL in the result, not the title. Titles get copied between environments. The host usually does not. A temporary copy tends to live on a subdomain (staging, dev, or preview in front of your domain), on a host's own preview domain, or in a folder on the public site such as a /staging/ or /preview/ path. A rule that is safe on a subdomain can hide the public site if you apply it to the bare domain.
Open the result next to the public site. Look for a banner, sample prices, placeholder text, an old phone number, or a form the live site no longer uses. Then view source and find two lines if they are there: a robots meta tag, and a link element with rel="canonical". Write down the host in that canonical address as the browser resolved it. A relative path can turn into the preview host once the page is served. Google recommends absolute canonical URLs, and notes that relative paths can cause problems if a testing site is left open to crawlers [10].
A broad site: query will not separate the hosts for you. Google says a site: query for a bare domain returns results from that domain, including the www host and subdomains [7]. Run one query that starts with the public origin, scheme and host included, and another that starts with the preview origin or the preview folder. The operator does not necessarily return every indexed URL under that prefix, and a site: query with no other words does not rank the results [7]. Use it to spot the host, not to count pages. For a single address, search that exact URL. Search Console's URL Inspection help says "URL is on Google" means the URL is eligible to appear, not that it is guaranteed to, and that searching for the page URL is the check that settles it [8].
See which copy Google treats as the real one
Google's canonicalization guide names this situation: "the demo version of the site is accidentally left accessible to crawlers" [6]. When the main content of two pages is the same, or very close, Google groups them and chooses one URL as the canonical, the representative it usually shows [6]. The public page can stop appearing because the preview was chosen, not because anyone noindexed the live site. A result usually points at the canonical URL unless another copy is explicitly better suited to that searcher [6].
You can state a preference. A rel="canonical" link is a strong signal, and a sitemap entry is a weak one [10]. Google may still choose a different page. A declared canonical is a hint, not a rule [6]. Pointing the preview's canonical at the public URL will not by itself take the preview out of search.
The same guide says some duplicate content is normal and is not a violation of Google's spam policies [6]. That page does not give a traffic-loss number, and this post will not invent one. Check which URL Google selected, and check whether a search for the business name still returns the public host.
In Search Console, the Google-selected canonical is on the indexed report, under Page indexing. The live test cannot predict which URL Google selected, and the indexed report describes the last stored version, not the page you edited a few minutes ago [8]. The URL also has to sit in the property you have open [8]. A URL-prefix property includes only URLs that start with that prefix. Google's example is that an http property does not include the https version, and does not include www. A URL-prefix for the public host does not include a subdomain [9]. A Domain property includes subdomains, www and non-www, and both http and https. It does not include a different registrable domain [9]. A preview on a builder's domain needs its own property.
Do not noindex the public page to force the choice. Google does not recommend noindex as a way to stop a page being selected as canonical within a site, because noindex blocks that page from Search entirely [10]. You want that outcome on the preview. You do not want it on the pages customers should find. Even after the copies are no longer twins, Google says it might hold pages in a duplicate cluster for up to two weeks [12].
Keeping a separate copy for edits before you touch production is a different job. That belongs in what a maintenance plan should cover after launch. This post is only the case where the temporary copy is already in the results.
Put the lasting control on the preview only
A robots.txt file applies only to the protocol, host, and port where it is posted. Rules on the public host do not apply to a subdomain, and rules posted under https do not apply to http on that same name [11]. Editing the public file does not hide the preview, and the reverse is also true.
Do not use robots.txt as the way to pull an indexed page out of Google. Google says a robots.txt file is not a mechanism for keeping a web page out of Google [2]. A disallowed URL can still be indexed when other pages link to it. The address, and sometimes the anchor text, can show, often with no description [2]. The Removals help says not to use robots.txt as the blocking mechanism for a permanent removal [5].
A disallow also hides the fix you actually want. Google reads a noindex meta tag or an X-Robots-Tag header only by crawling the URL. If robots.txt disallows that URL, those rules are ignored [3]. Google's noindex guide says to edit robots.txt so the crawler can see the tag [1]. If you noindex the preview, leave those preview URLs allowed in that host's robots.txt until Google has crawled them. Do not add a site-wide disallow on the public host while you do this. Disallowing only a /staging/ folder does not by itself block the homepage, but it will hide a noindex on that folder [1][3]. For a folder on the public host, password-protect the folder, or noindex it and leave it crawlable.
Three lasting options. Use one, on the temporary copy only.
Password-protect the preview if editors still need it. Google lists this as a lasting block: the right people can open the page, and Googlebot and other crawlers cannot [4]. The Removals help treats a password as more secure than noindex [5]. noindex only keeps the page out of Google Search results. People with the link can still open it, and an engine that does not honor noindex may still list it [1][4]. That matters when the preview shows draft prices or a form that still accepts entries.
Use noindex if the preview link has to stay public. For HTML, put this in the head, not the body [3]:
<meta name="robots" content="noindex">
The name and the content are case-insensitive [3]. A robots name covers crawlers that honor the rule. A googlebot name covers Google only [1]. A preview should usually use robots. For a PDF or other non-HTML file, a meta tag does nothing. Send the header Google documents, X-Robots-Tag with the value noindex [1][3]. Confirm the tag in the rendered source of the preview URL, and confirm the public homepage source does not contain the same tag. A settings checkbox that only writes a robots.txt disallow will not do this job [1][3].
Google has to recrawl before noindex changes results. If the page is still showing, the usual reason is that Google has not crawled it since you added the rule, and a revisit can take months, depending on how important the URL is [1]. URL Inspection can request a recrawl and can show the HTML Googlebot received [1]. The Page indexing report lists pages where Googlebot extracted noindex, for the property that actually contains those URLs [1].
Take the preview down if nobody needs it. Remove those files and return a Not Found (404) or Gone (410) status [5]. The Removals help lists those statuses as a permanent step, and says non-HTML files should be deleted rather than merely disallowed [5]. Ordinary missing URLs do not need an urgent removal. They drop out as Google recrawls [5]. Use the removal tool when the preview is already showing in normal results and you cannot wait for that recrawl [5].
Take preview URLs out of any sitemap you submit. A sitemap entry is a weak canonical signal, and Google says not to name one URL in the sitemap and a different URL with rel="canonical" [10]. On each public page, use one absolute canonical that points at that public URL, including a self-referential canonical [10].
Hide the preview quickly, and only the preview
The Removals tool is the fast step, not the lasting one. Google's removal guide says it can take a page you host out of search results within a day, and that a request lasts about six months [4]. The help page adds that processing usually takes up to a day, that acceptance is not guaranteed, and that the block does not stop crawling [5]. When the six months end, the URL can come back unless you have removed it, password-protected it, or noindexed it [4][5]. Do the lasting step the same week you file the request.
The URL has to belong to a Search Console property you own [5]. If you only have a URL-prefix property for the public site, add the preview host or use a verified Domain property before the tool will accept a subdomain or a different preview domain [5][9]. Adding a property does not affect the site on Google Search. It only lets you track performance [9].
For one URL, choose the option that removes that URL only, and paste the address from the result. Capitalization counts, and the part after a hash mark is ignored [5]. If several variants show the same content, submit each one [5]. For a whole preview host or folder, choose the option that removes every URL with that prefix. Google's help says a prefix on a staging host does not block the www host or the bare public domain [5]. A prefix of the public site itself is the wrong request. Blocking the www host also blocks the non-www host, across http and https [5]. Other subdomains are not included in a prefix on the parent host [5]. Read the confirmation text. If it names the public site, cancel.
Do not use this tool to pick which duplicate should appear. It will not keep the version you prefer, and it can remove the http, https, www, and non-www variants of a URL together [5].
One timing trap: if the URL is already unreachable (a Not Found response, or a 502 or 503 server error) when you submit, Google treats the page as gone and the block expires [5]. A page later published at that address can be treated as new [5]. Submit while the preview still resolves, or get the password or the noindex in place first.
Check that people still find the public site
Repeat the check the day you change the preview, and again after the cluster has had time to move. Google says that even after you fix the duplication, it might hold those pages together for up to two weeks [12].
In a private window, search the business name and confirm the result uses the public host. Then search a quoted sentence that exists only on the preview. It should stop returning that host after Google processes the noindex, the password, or the removal. If it is still there the next day, you are usually waiting on a crawl [1]. Do not treat an empty site: query as proof every preview URL is gone [7].
Inspect the public homepage and a few public URLs that were competing with the preview. On the indexed report, the public URL should be eligible, and the Google-selected canonical should be the public URL [8][12]. If it is still the preview, the preview change has not been recrawled. Request indexing for the important public URLs only. That feature has a quota [12]. Then inspect one preview URL and confirm the live test shows noindex, or that Google cannot fetch the page without a login.
Open the public homepage source. There should be no noindex [3]. Fetch the public robots.txt and confirm it does not disallow the pages you want found [2][11]. Fetch the preview robots.txt and confirm it does not disallow a URL whose noindex you still need Google to read [1][3]. If the public robots.txt names a sitemap, open it and confirm the preview host is not listed [10][11]. If the public homepage does contain noindex, remove that tag from the public host. Left in place, it drops the public page from Google Search results on the next crawl [1].
Practical takeaways
- Read the host in the result before you change a setting. A subdomain, a folder, and a preview on another domain are three different scopes.
- A site: query on the bare domain mixes subdomains and does not list every indexed URL. Check each origin, and search the exact URL [7][8].
- robots.txt does not reliably remove an indexed page, it applies only to the host where it is posted, and a disallow hides noindex [1][2][11].
- On the preview only: password-protect it, noindex it and leave it crawlable, or retire it with a Not Found or Gone status. Do none of those to the public host [4][5].
- A removal lasts about six months, does not stop crawling, and must name the preview prefix. A prefix on the public host can hide the www and non-www site together [4][5].
- Afterward, confirm the public URL is still eligible and that the Google-selected canonical is the public URL. A duplicate cluster can take up to two weeks to loosen [8][12].
How we can help
Have more questions or want to get in touch?
If a preview address is already showing in Google and you want a second set of eyes on which host is which, contact IDFS AI. Send the URL that is appearing and the URL you want customers to find. We will help you tell the two apart and keep the fix on the temporary copy.
Citations
- Google Search Central, "Block Search indexing with noindex" (2025-12-10)
- Google Search Central, "Introduction to robots.txt" (2025-12-10)
- Google Search Central, "Robots meta tag, data-nosnippet, and X-Robots-Tag specifications" (2026-03-24)
- Google Search Central, "Remove a page hosted on your site from Google" (2025-12-10)
- Google Search Console Help, "Removals and SafeSearch reports tool" (accessed 2026-11-06)
- Google Search Central, "What is canonicalization" (2026-08-20)
- Google Search Central, "site: search operator" (2025-12-10)
- Google Search Console Help, "URL Inspection tool" (accessed 2026-11-06)
- Google Search Console Help, "Add a website or platform property to Search Console" (accessed 2026-11-06)
- Google Search Central, "How to specify a canonical URL with rel=\"canonical\" and other methods" (2026-07-10)
- Google for Developers, "Create and Submit a robots.txt File" (2025-11-21)
- Google Search Central, "Fix canonicalization issues" (2026-08-21)


