开发者

Make content invisible to search engines

How can I hide a specific <div> from Google? Is there an开发者_StackOverflow中文版y other solution than using javascript to insert this element?

I read about <!-- googleoff: index--> here, but I'm not sure it does what I want. The problem is that the div I'm trying to hide can be seen as duplicate content by Google, and even if it hides it from the search results, I think it still penalizes you...


You can put the data in separate file, load it using iframe and block google spider from this file using robots.txt.


Apart from dynamically inserting the text into a page in a way that will only occur on a browser (as you mention, javascript would be the weapon of choice), not really.

You could hide the whole page using the correct robots.txt entry, but that doesn't seem to be what you are trying to achieve. This could work if the page contains only the text you want to hide and you insert it as an IFrame.


I don't know the specifics of what you are trying to hide, so this may or may not be ideal. However, one option that might work for some scenarios would be to convert the content you are trying to hide from the search engines to an image.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜