The Moz Q&A Forum

    • Forum
    • Questions
    • My Q&A
    • Users
    • Ask the Community

    Welcome to the Q&A Forum

    Browse the forum for helpful insights and fresh discussions about all things SEO.

    1. SEO and Digital Marketing Q&A Forum
    2. Categories
    3. Technical SEO Issues
    4. Staging site and "live" site have both been indexed by Google

    Staging site and "live" site have both been indexed by Google

    Technical SEO Issues
    6 2 1.3k
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as question
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • melen
      melen last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • jesse-landry
        jesse-landry last edited by

        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.

        melen 1 Reply Last reply Reply Quote 1
        • melen
          melen @jesse-landry last edited by

          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.

          jesse-landry 1 Reply Last reply Reply Quote 0
          • jesse-landry
            jesse-landry @melen last edited by

            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!

            melen 1 Reply Last reply Reply Quote 3
            • melen
              melen @jesse-landry last edited by

              Really my main concern is the duplicate content issue.  I think the 301 should solve it

              jesse-landry 1 Reply Last reply Reply Quote 1
              • jesse-landry
                jesse-landry @melen last edited by

                It definitely will.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                • 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?
                  Nigel_Carr
                  Nigel_Carr
                  1
                  4
                  106

                • My sites "pages indexed by Google" have gone up more than qten-fold.
                  MibuKotaro
                  MibuKotaro
                  0
                  4
                  89

                • Why is Google not indexing my site?
                  Shawn_Huber
                  Shawn_Huber
                  0
                  18
                  198

                • Google indexing staging / development site that is redirected...
                  evolvingSEO
                  evolvingSEO
                  0
                  2
                  636

                • "Links to your site" in google webmaster tools not showing any data
                  TimKelsey
                  TimKelsey
                  0
                  2
                  3.3k

                • My beta site (beta.website.com) has been inadvertently indexed. Its cached pages are taking traffic away from our real website (website.com). Should I just "NO INDEX" the entire beta site and if so, what's the best way to do this? Please advise.
                  Vuly
                  Vuly
                  0
                  5
                  1.6k

                • How Does Google's "index" find the location of pages in the "page directory" to return?
                  reidsteven75
                  reidsteven75
                  0
                  9
                  215

                • Why is "FTP Directory Listing" included in our Title in Google Search Results Index
                  hasansplace
                  hasansplace
                  0
                  8
                  600

                Get started with Moz Pro!

                Unlock the power of advanced SEO tools and data-driven insights.

                Start my free trial
                Products
                • Moz Pro
                • Moz Local
                • Moz API
                • Moz Data
                • STAT
                • Product Updates
                Moz Solutions
                • SMB Solutions
                • Agency Solutions
                • Enterprise Solutions
                • Digital Marketers
                Free SEO Tools
                • Domain Authority Checker
                • Link Explorer
                • Keyword Explorer
                • Competitive Research
                • Brand Authority Checker
                • Local Citation Checker
                • MozBar Extension
                • MozCast
                Resources
                • Blog
                • SEO Learning Center
                • Help Hub
                • Beginner's Guide to SEO
                • How-to Guides
                • Moz Academy
                • API Docs
                About Moz
                • About
                • Team
                • Careers
                • Contact
                Why Moz
                • Case Studies
                • Testimonials
                Get Involved
                • Become an Affiliate
                • MozCon
                • Webinars
                • Practical Marketer Series
                • MozPod
                Connect with us

                Contact the Help team

                Join our newsletter
                Moz logo
                © 2021 - 2026 SEOMoz, Inc., a Ziff Davis company. All rights reserved. Moz is a registered trademark of SEOMoz, Inc.
                • Accessibility
                • Terms of Use
                • Privacy