Skip navigation
Currently Being Moderated

Preventing Google from indexing your test server?

Mar 8, 2012 11:12 AM

How can I prevent Google and other search engines from indexing the test server I use to develop client websites. I'm pretty sure you can do this with a robots.txt file but I don't know what to put in the file or where to put it on my server. Thanks in advance for your help.

 
Replies
  • Currently Being Moderated
    Mar 8, 2012 11:20 AM   in reply to kcrossley

    Here's a simple version of what you need to do:

     

    http://www.robotstxt.org/robotstxt.html

     

    It just goes in the web directory of your site (eg: /www or /public_html).  I would also make sure that you password it too and use other methods protection.  That way if some bot decides to ignore the robots.txt file, which is not supposed to but can happen, the person visiting the site gets forced to your login page.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2012 11:48 AM   in reply to kcrossley

    http://en.wikipedia.org/wiki/Robots.txt See Examples

     

    Place robots.txt in the root folder of your website

     

    To exclude indexing one folder named "test" only

     

    User-agent: *

    Disallow: /test/

     

    Remember that robots.txt works on an honor basis. It asks bots not to index. They obey your instructions only if they're programmed to do so. Google honors robots.txt according to Google.

     

    But

     

    "While Google won't crawl or index the content of pages blocked by robots.txt, we may still index the URLs if we find them on other pages on the web. As a result, the URL of the page and, potentially, other publicly available information such as anchor text in links to the site, or the title from the Open Directory Project (www.dmoz.org), can appear in Google search results."

     

    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=156449

     

    So, no guarantees your test sites won't end up on the web somewhere without password protection.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 8, 2012 12:52 PM   in reply to kcrossley

    Yes, according to my reading of the Google link.

     

    http://support.google.com/webmasters/bin/answer.py?hl=en&answer=156449

     

    To block a directory and everything in it, follow the directory name with a forward slash.

    Disallow: /junk-directory/ 

     

    If you have any further questions on this, feel free to read through the Wikipedia and Google links which should be able to provide most of the answers.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points