{"id":2529,"date":"2014-09-10T22:25:03","date_gmt":"2014-09-10T22:25:03","guid":{"rendered":"https:\/\/mysiteauditor.com\/blog\/?p=2529"},"modified":"2023-06-26T18:56:35","modified_gmt":"2023-06-26T18:56:35","slug":"how-to-stop-a-staging-site-from-being-listed-in-google","status":"publish","type":"post","link":"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/","title":{"rendered":"How to Stop a Staging Site From Being Listed in Google"},"content":{"rendered":"<p>Ever have this problem?\u00a0Your staging site accidentally gets listed in Google&#8217;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&#8217;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&#8217;t always happen because the staging site wasn&#8217;t properly blocking Google, resulting in the site being listed in Google.<\/p>\n<h2>Indexed vs Listed<\/h2>\n<p>This is the first common mistake. <strong>Many people think blocking Google from indexing your site means you won&#8217;t be listed in their search results.<\/strong> So, they end up using robots.txt to block Google from indexing the staging site. That is very wrong. Here&#8217;s why:<\/p>\n<p><strong>Being <span style=\"text-decoration: underline;\">indexed<\/span> means that your site or web pages have been downloaded and added to a server.<\/strong> That&#8217;s all. <strong>Being <span style=\"text-decoration: underline;\">listed<\/span> means that Google is displaying a link to your site or page in their search results.<\/strong> So, blocking Google from indexing your site doesn&#8217;t mean they still won&#8217;t list your site in their search results. It just means they won&#8217;t keep a copy of it on their server.<\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/KBdEwpRQRD0\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>Here&#8217;s how to stop Google from listing and indexing your staging site.<\/p>\n<h2>Step 1: robots.txt<\/h2>\n<p>You still want to try and block Google from indexing your site. It does help. But it&#8217;s not the answer; hence, step two. \u00a0If you don&#8217;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.<\/p>\n<p>In the robots.txt file simply add these two lines:<\/p>\n<p>User-agent: *<br \/>\nDisallow: \/<\/p>\n<h2>Step 2: .htaccess login<\/h2>\n<p>The second step and <strong><span class=\"gmw_\">the most effective way to stop your staging site from being listed\u00a0in Google&#8217;s search results <span class=\"gm_ gm_a76c124b-efdb-ad82-4b8d-ab57d95004fd gm-spell\">is<\/span> to require a\u00a0username and password to enter the site using .htaccess.<\/span><\/strong> This will stop Google from accessing and listing your staging site in their search results.\u00a0<a href=\"https:\/\/support.google.com\/webmasters\/answer\/93708?hl=en&amp;rd=1\" target=\"_blank\" rel=\"noopener\">Learn more from\u00a0Google<\/a><\/p>\n<p>Create a .htaccess login is fairly simple.\u00a0In fact, there are a few free tools that will do it for you:<br \/>\n<a href=\"http:\/\/tools.dynamicdrive.com\/password\/\" target=\"_blank\" rel=\"noopener\">http:\/\/tools.dynamicdrive.com\/password\/<\/a><br \/>\n<a href=\"http:\/\/www.htaccesstools.com\/htaccess-authentication\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.htaccesstools.com\/htaccess-authentication\/<\/a><\/p>\n<h3>Conclusion<\/h3>\n<p>That&#8217;s all there is to it. If you follow both steps you won&#8217;t get listed in Google&#8217;s search results. Both steps shouldn&#8217;t take you more than 5 minutes to complete. Oh, be sure\u00a0to remember one more important thing: don&#8217;t forget to give your client the username and password to the staging site.<\/p>\n","protected":false},"excerpt":{"rendered":"Ever have this problem?\u00a0Your staging site accidentally gets listed in Google&#8217;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&#8217;s really embarrassing when the client Googles themselves and sees the staging site in the results. [&hellip;]","protected":false},"author":77,"featured_media":2714,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"episode_type":"audio","audio_file":"","cover_image":"","cover_image_id":"","duration":"","filesize":"","date_recorded":"","explicit":"","block":"","filesize_raw":""},"categories":[3],"tags":[],"series":[],"episode_featured_image":"https:\/\/mysiteauditor.com\/blog\/wp-content\/uploads\/2014\/09\/stop-staging-site-indexed-listed.png","episode_player_image":"https:\/\/mysiteauditor.com\/blog\/wp-content\/uploads\/2015\/04\/itunes-cover.jpg","download_link":false,"player_link":false,"audio_player":false,"episode_data":{"playerMode":"dark","subscribeUrls":[],"rssFeedUrl":"https:\/\/mysiteauditor.com\/blog\/feed\/podcast","embedCode":"<blockquote class=\"wp-embedded-content\" data-secret=\"Vf7Tt720cs\"><a href=\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\">How to Stop a Staging Site From Being Listed in Google<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/embed\/#?secret=Vf7Tt720cs\" width=\"500\" height=\"350\" title=\"&#8220;How to Stop a Staging Site From Being Listed in Google&#8221; &#8212; MySiteAuditor\" data-secret=\"Vf7Tt720cs\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script type=\"text\/javascript\">\n\/*! This file is auto-generated *\/\n!function(c,d){\"use strict\";var e=!1,o=!1;if(d.querySelector)if(c.addEventListener)e=!0;if(c.wp=c.wp||{},c.wp.receiveEmbedMessage);else if(c.wp.receiveEmbedMessage=function(e){var t=e.data;if(!t);else if(!(t.secret||t.message||t.value));else if(\/[^a-zA-Z0-9]\/.test(t.secret));else{for(var r,s,a,i=d.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),n=d.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),o=new RegExp(\"^https?:$\",\"i\"),l=0;l<n.length;l++)n[l].style.display=\"none\";for(l=0;l<i.length;l++)if(r=i[l],e.source!==r.contentWindow);else{if(r.removeAttribute(\"style\"),\"height\"===t.message){if(1e3<(s=parseInt(t.value,10)))s=1e3;else if(~~s<200)s=200;r.height=s}if(\"link\"===t.message)if(s=d.createElement(\"a\"),a=d.createElement(\"a\"),s.href=r.getAttribute(\"src\"),a.href=t.value,!o.test(a.protocol));else if(a.host===s.host)if(d.activeElement===r)c.top.location.href=t.value}}},e)c.addEventListener(\"message\",c.wp.receiveEmbedMessage,!1),d.addEventListener(\"DOMContentLoaded\",t,!1),c.addEventListener(\"load\",t,!1);function t(){if(o);else{o=!0;for(var e,t,r,s=-1!==navigator.appVersion.indexOf(\"MSIE 10\"),a=!!navigator.userAgent.match(\/Trident.*rv:11\\.\/),i=d.querySelectorAll(\"iframe.wp-embedded-content\"),n=0;n<i.length;n++){if(!(r=(t=i[n]).getAttribute(\"data-secret\")))r=Math.random().toString(36).substr(2,10),t.src+=\"#?secret=\"+r,t.setAttribute(\"data-secret\",r);if(s||a)(e=t.cloneNode(!0)).removeAttribute(\"security\"),t.parentNode.replaceChild(e,t);t.contentWindow.postMessage({message:\"ready\",secret:r},\"*\")}}}}(window,document);\n<\/script>\n"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Stop Staging Site From Being Listed in Google | MySiteAuditor<\/title>\n<meta name=\"description\" content=\"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Stop Staging Site From Being Listed in Google | MySiteAuditor\" \/>\n<meta property=\"og:description\" content=\"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\" \/>\n<meta property=\"og:site_name\" content=\"MySiteAuditor\" \/>\n<meta property=\"article:published_time\" content=\"2014-09-10T22:25:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-06-26T18:56:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mysiteauditor.com\/blog\/wp-content\/uploads\/2014\/09\/stop-staging-site-indexed-listed.png\" \/>\n\t<meta property=\"og:image:width\" content=\"560\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Andre Harris\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andre Harris\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\",\"url\":\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\",\"name\":\"Stop Staging Site From Being Listed in Google | MySiteAuditor\",\"isPartOf\":{\"@id\":\"https:\/\/mysiteauditor.com\/blog\/#website\"},\"datePublished\":\"2014-09-10T22:25:03+00:00\",\"dateModified\":\"2023-06-26T18:56:35+00:00\",\"author\":{\"@id\":\"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/244cd54228bf104ae2195f388e3c8df2\"},\"description\":\"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/\"]}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/mysiteauditor.com\/blog\/#website\",\"url\":\"https:\/\/mysiteauditor.com\/blog\/\",\"name\":\"MySiteAuditor\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/mysiteauditor.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/244cd54228bf104ae2195f388e3c8df2\",\"name\":\"Andre Harris\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/71787342134c7bf9d5a4534dedd97867?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/71787342134c7bf9d5a4534dedd97867?s=96&d=monsterid&r=g\",\"caption\":\"Andre Harris\"},\"url\":\"https:\/\/mysiteauditor.com\/blog\/author\/andreharris\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Stop Staging Site From Being Listed in Google | MySiteAuditor","description":"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/","og_locale":"en_US","og_type":"article","og_title":"Stop Staging Site From Being Listed in Google | MySiteAuditor","og_description":"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.","og_url":"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/","og_site_name":"MySiteAuditor","article_published_time":"2014-09-10T22:25:03+00:00","article_modified_time":"2023-06-26T18:56:35+00:00","og_image":[{"width":560,"height":300,"url":"https:\/\/mysiteauditor.com\/blog\/wp-content\/uploads\/2014\/09\/stop-staging-site-indexed-listed.png","type":"image\/png"}],"author":"Andre Harris","twitter_misc":{"Written by":"Andre Harris","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/","url":"https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/","name":"Stop Staging Site From Being Listed in Google | MySiteAuditor","isPartOf":{"@id":"https:\/\/mysiteauditor.com\/blog\/#website"},"datePublished":"2014-09-10T22:25:03+00:00","dateModified":"2023-06-26T18:56:35+00:00","author":{"@id":"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/244cd54228bf104ae2195f388e3c8df2"},"description":"Prevent your staging site from appearing in Google search results. Follow our step-by-step guide to ensure your development site is private.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/mysiteauditor.com\/blog\/how-to-stop-a-staging-site-from-being-listed-in-google\/"]}]},{"@type":"WebSite","@id":"https:\/\/mysiteauditor.com\/blog\/#website","url":"https:\/\/mysiteauditor.com\/blog\/","name":"MySiteAuditor","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/mysiteauditor.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/244cd54228bf104ae2195f388e3c8df2","name":"Andre Harris","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/mysiteauditor.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/71787342134c7bf9d5a4534dedd97867?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/71787342134c7bf9d5a4534dedd97867?s=96&d=monsterid&r=g","caption":"Andre Harris"},"url":"https:\/\/mysiteauditor.com\/blog\/author\/andreharris\/"}]}},"_links":{"self":[{"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/posts\/2529"}],"collection":[{"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/users\/77"}],"replies":[{"embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/comments?post=2529"}],"version-history":[{"count":1,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/posts\/2529\/revisions"}],"predecessor-version":[{"id":6293,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/posts\/2529\/revisions\/6293"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/media\/2714"}],"wp:attachment":[{"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/media?parent=2529"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/categories?post=2529"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/tags?post=2529"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/mysiteauditor.com\/blog\/wp-json\/wp\/v2\/series?post=2529"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}