treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Meta Tag to Prevent Search Engine Bots

Last updated on:

To prevent all search bots from indexing a page:

<meta name="robots" content="noindex">

To prevent just Google:

<meta name="googlebot" content="noindex">

If you have control over it, you probably want to add nofollow to links that point to that page as well:

<a href="privatepage.html" rel="nofollow">Link to private page</a>

Theoretically that's not needed for Google, which claims to drop all pages with noindex from their directory. But there are more search engines out there and it doesn't hurt.

Reference URL

View Comments

Comments

  1. Also, you might want to add a robots.txt to prevent the bots from indexing your directories, it might look like this:

    User-agent: *
    Disallow: /

    which would prevent all bots from indexing; of course you can also only block certain bots by their user agent; google it :-)

  2. Hi.. if use nofollow, that link will be index or not?

  3. Very useful especially for admin pages.

Leave a Comment

Use markdown or basic HTML and be nice.