Staging site and "live" site have both been indexed by Google
-
While creating a site we forgot to password protect the staging site while it was being built. Now that the site has been moved to the new domain, it has come to my attention that both the staging site (site.staging.com) and the "live" site (site.com) are both being indexed. What is the best way to solve this problem? I was thinking about adding a 301 redirect from the staging site to the live site via HTACCESS. Any recommendations?
-
It definitely will.
-
Really my main concern is the duplicate content issue. I think the 301 should solve it
-
Yes the 301 will solve it but not necessarily any quicker than the robots.txt update. It will still be indexed until Google crawls it again, which doesn't really matter too terribly (especially if you're redirecting)
Chances are your site won't populate for any high-volume keywords since it's new... And it would be de-indexed eventually if you blocked it from the robots. In any case, all of these options will work and you should be fine.
Good luck!
-
Unfortunately we took the site live before we realized that Google had somehow indexed the pages. So I think adding the 301 redirects should solve the problem. In the future I will add the noindex, no follow tag to each dev page. I will also password protect the dev. site.
-
That would be a good way to do it. The other way would be to block it in the robots.txt file on the root directory. Although be careful you aren't blocking both since it's a subdomain.
You could also add a noindex, nofollow tag to each dev page but then you have to remember to remove those when you push them live to your real domain.
I'd probably go with the Robots.txt option since using the redirect will not allow you to view the site live which I'm assuming would take away from the whole point of having this "staging" sub-domain.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
"nofollow" vs. "no follow"
Does anyone know if it is problematic to have a space between the "no" and the "follow"? I just discovered our CMS has been inserting a space and am trying to understand if it the reason why something that we were trying to keep from being indexed has become indexed.
Technical SEO | | LivDetrick0 -
Keep getting "/feed" broken links in Google Search Console
Hey guys, I'm having an issue for the past few months. I keep getting "/feed" broken links in Google Search Console (screenshot attached). The site is a WordPress site using the YoastSEO plugin for on-page SEO and sitemap. Has anyone else experienced this issue? Did you fix it? How should I redirect these links? s7elXMy
Technical SEO | | Extima-Christian0 -
New SEO manager needs help! Currently only about 15% of our live sitemap (~4 million url e-commerce site) is actually indexed in Google. What are best practices sitemaps for big sites with a lot of changing content?
In Google Search console 4,218,017 URLs submitted 402,035 URLs indexed what is the best way to troubleshoot? What is best guidance for sitemap indexation of large sites with a lot of changing content? view?usp=sharing
Technical SEO | | Hamish_TM1 -
Google has deindexed 40% of my site because it's having problems crawling it
Hi Last week i got my fifth email saying 'Google can't access your site'. The first one i got in early November. Since then my site has gone from almost 80k pages indexed to less than 45k pages and the number is lowering even though we post daily about 100 new articles (it's a online newspaper). The site i'm talking about is http://www.gazetaexpress.com/ We have to deal with DDoS attacks most of the time, so our server guy has implemented a firewall to protect the site from these attacks. We suspect that it's the firewall that is blocking google bots to crawl and index our site. But then things get more interesting, some parts of the site are being crawled regularly and some others not at all. If the firewall was to stop google bots from crawling the site, why some parts of the site are being crawled with no problems and others aren't? In the screenshot attached to this post you will see how Google Webmasters is reporting these errors. In this link, it says that if 'Error' status happens again you should contact Google Webmaster support because something is preventing Google to fetch the site. I used the Feedback form in Google Webmasters to report this error about two months ago but haven't heard from them. Did i use the wrong form to contact them, if yes how can i reach them and tell about my problem? If you need more details feel free to ask. I will appreciate any help. Thank you in advance C43svbv.png?1
Technical SEO | | Bajram.Kurtishaj1 -
Why did Google stop indexing my site?
Google used to crawl my site every few minutes. Suddenly it stopped and the last week it indexed 3 pages out of thousands. https://www.google.co.il/#q=site:www.yetzira.com&source=lnt&tbs=qdr:w&sa=X&ei=I9aTUfTTCaKN0wX5moCgAw&ved=0CBgQpwUoAw&bav=on.2,or.r_cp.r_qf.&fp=cfac44f10e55f418&biw=1829&bih=938 What could cause this to happen and how can I solve this problem? Thanks!
Technical SEO | | JillB20130 -
How a google bot sees your site
So I have stumbled across various websites like this: http://www.smart-it-consulting.com/internet/google/googlebot-spoofer/ The concept here is to be able to view your site as a googlebot sees it. However, the results are a little puzzling. Google is reading the text on my page but not the title tags according to the results. Are websites like this accurate OR does Google not read title tags and H1 tags anymore? Also on a slighly related note. I noticed the results show the navigation bar is being read first by google, is this bad and should the navigation bar be optimized for keywords as well? If it did, it would read a bit funny and the "humans" would be confused.
Technical SEO | | StreetwiseReports0 -
Site Navigation leads to "Too Many On-Page Links" warning
I run an ecommerce site with close to 2000 products. Nearly every page in the catalog has a too many on-page links error because of the navigation sidebar, which has several flyout layers of nested links. What can/should I do about this? Will it affect my rankings at all? Thanks
Technical SEO | | AmericanOutlets0 -
Google +1 Button on Flash sites
One of my customers is willing to add Google +1 button on their Flash websites. Is it possible? How can we add Google +1 button on a Flash site? Thanks in advance!
Technical SEO | | merkal20050