Ubuntu / Linux news and application reviews.

You must know of the rel="nofollow" link attribute which tells Google not to index the link to which is applied. Well, it seems there are some tags you can use to prevent Google from indexing certain parts of the website too: googleoff and googleon.

How googleoff and googleon work


There are 3 different parameters. Words surrounded by the googleon/off tags will not be indexed as occurring on the current page.

The "all" attribute turns on all of the attributes: index, anchor, and snippet:
<!--googleoff: all -->
everything between these tags will not be indexed
<!--googleon: all -->

Index attribute:
this is indexed by google
<!--–googleoff: index–--> this is NOT indexed by google <!--–googleon: index–-->
this is indexed by google

Anchor attribute:
<!--googleoff: anchor-->
<A href=linked_to_page.html> shark </A>
<!--googleon: anchor-->

This will not cause the word "shark" to be associated with the page "linked_to_page.html". Otherwise, this hyperlink could cause the page "linked_to_page.html" to be a search result for the search term "shark".

And finally, the snippet attribute:
<!--googleoff: snippet-->
The text surrounded by googleon/off tags will not be used to create snippets for search results.
<!--googleon: snippet-->


This is basically kind of like the Adsense tag:
<!--– google_ad_section_start–-->
relevant area for the ad
<!--– google_ad_section_end–-->

(More details about the google_ad_section_start, HERE)

For more about these, see this Google document | via vegabundia