12

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?

11

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.

  • 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 7 '17 at 7:42
  • @DmitriySintsov old answer, updated. – Simon Hayter Nov 7 '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.

  • 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 7 '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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.