How to Use Robots Meta Tags

Updated on

A special meta tag can be put in a page’s HTML to give instructions to bots.

The form of the tag is:

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

The name attribute declares that the tag is for robots. The content attribute is where you put the instructions.

Here are some possible content values to become familiar with:

See Google’s documentation for a full list of possible values.

A Caution about robots.txt and Robots Meta Tags

A common mistake that people make is to both block a page with robots.txt and use a noindex meta tag on the page.

That probably won’t work!

The robots.txt file will prevent Googlebot from fetching the page, so Googlebot won’t see the noindex meta tag. Since a robots.txt doesn’t prevent displaying the page in the search results, the page might show up in Google even though it has noindex meta tag.

If you really want to be sure that a page won’t show up in Google, use the robots meta tag or the X-Robots-Tag header, but don’t block it with robots.txt.

If you made a mistake with that and need to quickly remove content from Google, see these instructions.

Return to the main tutorial page.

Feedback and Comments

What did you think about this page? Do you have any questions, or is there anything that could be improved? You can leave a comment after clicking on an icon below.