How to Stop a Staging Site From Being Listed in Google

  • September 10th 2014
  • by Marvin Russell
How to Stop a Staging Site From Being Listed in Google

Ever have this problem? Your staging site accidentally gets listed in Google’s search results. This is very bad for many reasons. The first reason is the fear of being penalized for duplicate content once the production site goes live. Second, it’s really embarrassing when the client Googles themselves and sees the staging site in the results. Generally, the staging server should only be viewed by the developers and the client. Unfortunately, that doesn’t always happen because the staging site wasn’t properly blocking Google, resulting in the site being listed in Google.

Indexed vs Listed

This is the first common mistake. Many people think blocking Google from indexing your site means you won’t be listed in their search results. So, they end up using robots.txt to block Google from indexing the staging site. That is very wrong. Here’s why:

Being indexed means that your site or web pages have been downloaded and added to a server. That’s all. Being listed means that Google is displaying a link to your site or page in their search results. So, blocking Google from indexing your site doesn’t mean they still won’t list your site in their search results. It just means they won’t keep a copy of it on their server.

Here’s how to stop Google from listing and indexing your staging site.

Step 1: robots.txt

You still want to try and block Google from indexing your site. It does help. But it’s not the answer; hence, step two.  If you don’t know how to stop Google from indexing your site in robots.txt, just add this to a robots.txt file, and place it in the root folder of your website.

In the robots.txt file simply add these two lines:

User-agent: *
Disallow: /

Step 2: .htaccess login

The second step and the most effective way to stop your staging site from being listed in Google’s search results is to require a username and password to enter the site using .htaccess. This will stop Google from accessing and listing your staging site in their search results. Learn more from Google

Create a .htaccess login is fairly simple. In fact, there are a few free tools that will do it for you:
http://tools.dynamicdrive.com/password/
http://www.htaccesstools.com/htaccess-authentication/

Conclusion

That’s all there is to it. If you follow both steps you won’t get listed in Google’s search results. Both steps shouldn’t take you more than 5 minutes to complete. Oh, be sure to remember one more important thing: don’t forget to give your client the username and password to the staging site.

  • soheil

    Hi thanks
    Terrific Khvbtvn lot of very useful information and I thank you very much

    کرکره برقی
    تور چین
    درب اتوماتیک
    کرکره برقی

  • shila

    hello I thank enjoyed very nice
    automaticshutters.ir
    http://automatikdoors.ir
    http://tourschina.ir
    http://otomatikkapifirmasi.com

  • nazila

    I congratulate sait missing for a nice

    درب ضد سرقت چینی
    تور چین
    ofoghteam.ir
    http://lampost.blogfa.com

  • gika

    Nice infographic and useful, thank you .Otomatik kapı

  • Well .. this is very nice information but my website

    ser-Agent: *
    Allow: /
    User-Agent: Googlebot

    Disallow: /finegadgets.seobizworld.com

    But when you type in the Google search bar I found 6 results are showing
    So why Google is not blocking my specific page ?
    Please see the attached snap / picture, so all things will clear.
    Also please advise me what to do now, because I am working on my website and don’t want the Google listed my site right now.
    After when the site will 100% complete I will do all things manually, but not right now.

  • dargahi

    thank you for your good site . otomatik kepenk

  • Tim Brown

    Thank you – still trying to figure out how to disallow a large amount of sub folders.

  • Hi.

    How about add the ‘noindex’ and ‘nofollow’ content to meta tag?
    something like this –>

    might it help.

    • anna.hudson.91

      After getting fired from my job half year ago, I was blessed to come across this amazing site online that literally saved me… They hire people to freelance from home. My last payment after working with them for 3 months was $13k… Best thing about is that only thing needed is basic typing and a stable internet connection… http://korta.nu/MDe

    • april.clay.91

      One yr have passed since I finally abandoned my old job and i couldn’t be happier now… I started freelancing from my house, for this company I discovered online, several hours a day, and I earn much more than i did on my last job… My payment for last month was for 9000 bucks… Great thing about this is the more free time i got with my family… http://secure38.com

    • roseanne.leblanc

      After 5 yrs I finally abandoned my office job and I never felt this good… I started doing work from home, over a site I stumbled upon on-line, few hours a day, and I make much more than i did on my old job… My last month pay-check was for 9k… Superb thing about this is the more free time i got with my kids… http://chilp.it/8d93f4b

  • Sherry6658

    I usually benefit roughly six to eight thousand bucks /every month with my internet task. Those who are ready to work basic at home tasks for some hours every day from your living room and gain valuable salary while doing it… Test this task http://clck.ru/A54RG

    dfgdfg

  • marilyn.smith

    Make 90 bucks /day for working an online job from your own home for couple of hours each day… Get paid regularly on a weekly basis… You’ll need a laptop, internet access, and some spare time… http://korta.nu/NDe

  • kerry.perdue

    Start Earning 90 bucks /day for working over the internet from your home for several hr’s everyday… Get paid once a week… All you need is a computer, access to the web, plus some sparetime… http://ow.ly/n1nP303oO1A

  • susan.skinner.93

    1 year have passed since I quit my previous job and that decision changed everything for me… I started doing a job at home, for a company I stumbled upon over internet, several hours /a day, and I make much more than i did on my last job… Pay-check i got for last month was for 9000 bucks… Great thing about this gig is that i have more free time with my family…
    http://korta.nu/MDe

  • lottie.warford

    1 year have passed since I decided to quit my office work and I never felt this good… I started freelancing online, for this company I found online, for several hrs daily, and I profit now much more than i did on my last work… Payment i got for last month was for 9000 bucks… The best thing about this is that i have more time for my family…
    http://chilp.it/8d93f4b