2

I am working on a website and I am having troubles telling google not to index one <div> which is normally hidden (display: hidden;) on load because it is a popup (login popup). It is really bad when login popup goes right after tag because I usually store all popups at the beginning of body so content of it goes to description of my website in google search.

Do you have any ideas how can I hide it from google (maybe via javascript)?

EDIT: Thank you guys, you gave me a great solution with googleoff/on!

Nikola R.
  • 1,173
  • 6
  • 23
  • See the [authoritative document](https://developers.google.com/search-appliance/documentation/68/admin_crawl/Preparing#pagepart) that describes how to do this. – Ja͢ck Apr 26 '13 at 08:42
  • From webmasters.stackexchange.com: [Preventing robots from crawling specific part of a page](http://webmasters.stackexchange.com/questions/16390/preventing-robots-from-crawling-specific-part-of-a-page) – Stephen Ostermiller Apr 27 '13 at 08:57
  • This is basically the same question asked on this site: [noindex tag for google](http://stackoverflow.com/questions/15685205/noindex-tag-for-google/15718255) – Stephen Ostermiller Apr 27 '13 at 09:00
  • @Nikola R.: Note that `googleoff`/`googleon` won’t work. – unor Apr 28 '13 at 14:03

3 Answers3

2

I thnk this is what you're looking for

http://perishablepress.com/tell-google-to-not-index-certain-parts-of-your-page/

 <div>This is normal (X)HTML content that will be indexed by Google.</div>

 <!--googleoff: index-->

 <div>This (X)HTML content will NOT be indexed by Google.</div>

 <!--googleon: index>
sk8terboi87 ツ
  • 3,396
  • 3
  • 34
  • 45
  • 5
    googleoff and googleon only apply to the Google search appliance that you can buy to index your company's internal documents. The Googlebot that is out there on the web does not pay attention to these comments. – Stephen Ostermiller Apr 27 '13 at 08:55
  • If Stephen is right, this answer should be withdrawn by the OP. – Pekka Nov 04 '13 at 19:12
1

Go through this link (Tell Google to Not Index Certain Parts of Your Page: may be helpful) : http://perishablepress.com/tell-google-to-not-index-certain-parts-of-your-page/

-2

put the div farther down (aka at the end) in the content and use css to position it where you want it when visible.

Tad
  • 934
  • 6
  • 10