So you may or may not already know how to tell Google not to index an entire page on your site using the Meta Robots NoIndex tag. But what if you want to NoIndex just a specific section of a webpage? Well there’s a way to do that too.
The googleon and googleoff HTML Tags
<p>This is normal (X)HTML content that will be indexed by Google.</p> <!--googleoff: all--> <p>This (X)HTML content will NOT be indexed by Google</p> <!--googleon: all>
Notice the “googleoff” and “googleon” code? It’s really that simple. By placing the html you don’t want indexed in-between those lines of code you are effectively telling Google not to index that code. Notice where it says “all” in the code? This is a parameter that can be modified for different situations:
- index - content surrounded by “googleoff: index” will not be indexed by Google
- anchor – anchor text for any links within a “googleoff: anchor” area will not be associated with the target page
- snippet – content surrounded by “googleoff: snippet” will not be used to create snippets for search results
- all – content surrounded by “googleoff: all” are treated with all attributes: index, anchor, and snippet
On some of my posts assigned to more generic categories such as this one about VP Candidate Paul Ryan, I have a small snippet advertisement just below the title of the post. The problem I had was that Google was choosing to use this snippet as the Meta Description for these pages. These tags allowed me to communicate back to Google that I didn’t want them to recognize that snippet and instead pick content from the body of article itself.
Quick Note: right now Google is the only one who supports a tag like this… so this of course will not work for Bing and Yahoo! For more documentation on this tag from Google refer to their Administering Crawl page.