我想告诉谷歌不要索引页面的某些部分。在Yandex (俄语SE)中,有一个非常有用的标签,叫做<noindex>。怎样才能用谷歌做到呢?
发布于 2013-03-30 19:56:25
您可以通过将页面的某些部分放入被robots.txt阻止的iframes中来阻止谷歌查看这些部分。
robots.txt
Disallow: /iframes/index.html
This text is crawlable, but now you'll see
text that search engines can't see:
<iframe src="/iframes/hidden.html" width="100%" height=300 scrolling=no>/iframes/idden.html
Search engines cannot see this text.您可以使用AJAX加载隐藏文件的内容,而不是使用iframe。下面是一个使用jquery ajax完成此操作的示例:
his text is crawlable, but now you'll see
text that search engines can't see:
<div id="hidden"></div>
<script>
$.get(
"/iframes/hidden.html",
function(data){$('#hidden').html(data)},
);
</script>发布于 2013-03-28 23:03:32
不,Google does not support the tag。实际上,没有人这样做。
发布于 2013-03-31 00:59:33
在根级别创建一个robots.txt文件,并插入类似以下内容的内容:
屏蔽Google:
User-agent: Googlebot
Disallow: /myDisallowedDir1/
Disallow: /myDisallowedPage.html
Disallow: /myDisallowedDir2/阻止所有机器人:
User-agent: *
Disallow: /myDisallowedDir1/
Disallow: /myDisallowedPage.html
Disallow: /myDisallowedDir2/一个方便的robots.txt生成器:
http://www.mcanerin.com/EN/search-engine/robots-txt.asp
https://stackoverflow.com/questions/15685205
复制相似问题