13

I've seen code like for preventing Google from indexing part of a page:

<p>This is a paragraph that will be indexed by Google.</p>
<!--googleoff: index-->
<p>This is a paragraph that will NOT be indexed by Google.</p>
<!--googleon: index>

Does this work?

Stephen Ostermiller
  • 98,758
  • 18
  • 137
  • 361

3 Answers3

12

A similar question was asked on Stack Overflow back in January.

John Mueller was kind enough to respond with the following:

"googleon" and "googleoff" are only supported by the Google Search Appliance (when you host your own search results, usually for your own internal website).

They are not supported by Google's web-search at all.

As far as I know there is no such way of telling Google not to index a element of the page.

Simon Hayter
  • 32,999
  • 7
  • 59
  • 119
  • Google uses dummy repeatable content from small div for the description of the pages in search results instead of main large, non-repeatable blocks. That is not a cloaking, that is a hint to silly bot not to display useless content instead of real one. – Dmitriy Sintsov Nov 07 '17 at 07:42
  • @DmitriySintsov old answer, updated. – Simon Hayter Nov 07 '17 at 11:03
1

It is only supported by Google Search Appliance and is not officially documented by Google to be used for Google indexing so most likely will not work on Google.

However, Quora seems to use Googleon/Googleoff on their site for the purpose you want to use it for.

Tony
  • 11
  • 1
  • I searched on Google for pages on quora.com that are currently indexed in Google. I spot checked half a dozen of them and didn't find "googleoff" or "googleon" in any of them. The article you linked does support your assertion, but it may be out of date. – Stephen Ostermiller May 07 '15 at 20:06
0

I think the best thing to do is to use the tag at the head section of the page so that Google will not index the page. Another thing would be blocking the page in the robots.txt.

BryrDe
  • 482
  • 2
  • 5