23

I am trying to tell Google and other search engines not to crawl some parts of my web page.

What I do is:

<!--googleoff: all-->

<select name="ddlCountry" id="ddlCountry">
<option value="All">All</option>
<option value="bahrain">Bahrain</option>
<option value="china">China</option>
</select>

<!--googleon: all-->

After I uploaded the page, I noticed that search engines are stilling rendering elements within the googleoff markup.

Am I doing something wrong?

Simon Hayter
  • 3,131
  • 27
  • 53
user1643378
  • 303
  • 1
  • 3
  • 10
  • 6
    I'm not sure but everything I've read about `googleoff` sounds like it only applies to a Google Search Appliance, not necessarily Google.com itself. – Jonathon Reinhart Jan 14 '13 at 06:25
  • Not sure about how seo-browser works for live updating, as it also might have a crawler set on a time basis. What about using a monkey-script or addon to firebug or inspector – chris Frisina Jan 14 '13 at 06:26
  • Hello, i got firebug and just installed monkey-script but how to use these tools to check to accomplish my goal? thanks. – user1643378 Jan 14 '13 at 06:44
  • try to use and instead of `all` – Sumit Malik Jan 14 '13 at 06:46
  • Thanks Sumit. I justed changed the code and uploaded. but its still not working. the text inside google tag are still showing. help. – user1643378 Jan 14 '13 at 07:24
  • The googleon and googleoff tags only stop putting words inside the tags as searchable keywords. But the links will still be crawled. – Fandi Susanto Aug 05 '15 at 18:26
  • 3
    As someone already said, these tags are only for Google enterprise search and do not apply to the Google search engine that you are all saying it works for. See the page in Google's Enterprise help documents describing this. All the Google search engine allows you to do is take a page/URL out of the index, NOT a part of it.Ref: https://www.google.com/support/enterprise/static/gsa/docs/admin/70/gsa_doc_set/admin_crawl/preparing.html#1076243 –  Mar 21 '16 at 18:19
  • 1
    I voted to close this question because it is not a programming question and it is off-topic on Stack Overflow. Non-programming questions about your website should be asked on [webmasters.se]. In this case the question has already been asked and answered there: [Can you use googleon and googleoff comments to prevent Googlebot from indexing part of a page?](https://webmasters.stackexchange.com/questions/54735/can-you-use-googleon-and-googleoff-comments-to-prevent-googlebot-from-indexing-p) – Stephen Ostermiller Feb 07 '22 at 19:23

3 Answers3

80

"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.

John Mueller
  • 1,444
  • 9
  • 8
  • A fine and clear answer John, just what this confused thread needed! I have also clarified the situation on the two misleading comment threads that were open, and repeat that reference here, in support of your correct answer. It is the relevant section in Google's enterprise search docs: https://www.google.com/support/enterprise/static/gsa/docs/admin/70/gsa_doc_set/admin_crawl/preparing.html#1076243 –  Mar 21 '16 at 18:23
2

Is replaced by data attribute data-nosnippet only to div, span, or section elements, as shown here: https://developers.google.com/search/docs/advanced/robots/robots_meta_tag?hl=en#data-nosnippet-attr

menepet
  • 796
  • 13
  • 17
  • 2
    `data-nosnippet` prevents Google from showing that text in the search results but it doesn't prevent Google from indexing the words contained in it. It is useful and good to know about, but I wouldn't say that it is a "replacement" for the functionality from the search appliance. – Stephen Ostermiller Dec 19 '21 at 23:17
-10

The correct googleon tag is as given below:

    <!--googleon: all>
Shamas S
  • 7,507
  • 10
  • 46
  • 58
Sanjay
  • 1
  • 1
  • 8
    This is wrong, because it is missing two dashes before the closing angle bracket. Also it should be "index" not all. And finally it doesn't mention that this only applies to enterprise search software and not Google search proper. Reference: https://www.google.com/support/enterprise/static/gsa/docs/admin/70/gsa_doc_set/admin_crawl/preparing.html#1076243 –  Mar 21 '16 at 18:21