2

lets say i have a text

<span class="hide">for real</span><h2 id='show'>Obama is rocking the house</h2>
<span class="hide">not real</span><h2 id='show'>Bill gates is buying stackoverflow</h2>

i need the crawler to just read the

<h2 id='show'>Obama is rocking the house</h2>
<h2 id='show'>Bill gates is buying stackoverflow</h2>

can we do that?

im a bit confused here say that a hidden div is readed by google

Does google index pages with hidden divs?

but when i google for a sec, i found out that google doesnt read hidden div. so which is right?

http://www.seroundtable.com/archives/002971.html

what i have in mind is to ofucate it like using css instead.,

  1. i can put my text in a image. output it using image generator or something.
Community
  • 1
  • 1
Adam Ramadhan
  • 22,712
  • 28
  • 84
  • 124
  • 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: [How to keep text from showing in a search engine? (How to un-SEO specific text)](https://stackoverflow.com/questions/34695149/how-to-keep-text-from-showing-in-a-search-engine-how-to-un-seo-specific-text) – Stephen Ostermiller Feb 07 '22 at 19:21

3 Answers3

6

FYi, serving different content to users then to search engines is a violation of Google's terms of service and will get you banned if you're caught. Content that is hidden but can be accessed through some kind of trigger (navigation menu links is hovered over, the clicks on an icon to expand a content area, etc) is acceptable. But in your example you are showing different content to search engines specifically for their benefit and that is definitely what you don't want to do.

John Conde
  • 217,595
  • 99
  • 455
  • 496
1

The best way to suggest that a webcrawler not access content on your site is to create a robots.txt file. See http://robotstxt.org. There is no way to tell a robot to not access one part of a page

http://code.google.com/web/controlcrawlindex/docs/faq.html#h22

If you are going to use CSS remember that robots can still read CSS files! You could include the CSS file in the robots.txt file, though to exclude it.

If you really must have indexed and non-indexed content on the same page, maybe you should use frames and have the non-indexed frame listed in the robots.txt file as not to be indexed.

Well behaved crawlers will follow the robots.txt guidance, e.g. Google, but naughty ones will not. So, there is no guarantee.

adamleerich
  • 5,741
  • 2
  • 18
  • 20
0

I can confirm that google does read the hidden div, while it's not showing up in the search results.

The reason I know: I admin a website that has backlinks on a highly respected non profit. As the non profit doesn't want to show up in search results for a company website, they hide the links. However, if I check google's webmaster tools, I can see the backlinks form this non profit.