Izz*_*zzy 20
根据维基百科1,一些蜘蛛遵循一些规则:
<!--googleoff: all-->
This should not be indexed by Google. Though its main spider, Googlebot,
might ignore that hint.
<!--googleon: all-->
<div class="robots-nocontent">Yahoo bots won't index this.</div>
<noindex>Yandex bots ignore this text.</noindex>
<!--noindex-->They will ignore this, too.<!--/noindex-->
Run Code Online (Sandbox Code Playgroud)
不幸的是,他们似乎无法就单一标准达成一致 - 据我所知,没有什么可以阻止所有蜘蛛脱落......
该googleoff:
评论似乎支持不同的选择,但我不知道那里是一个完整的清单.至少有:
另请注意(至少对谷歌而言)这只会影响搜索索引,而不会影响页面排名等.此外,正如Stephen Ostermiller在下面的评论中正确指出的那样,googleon
并且googleoff
仅与Google Search Appliance配合使用并且对不幸的是,正常的Googlebot.
还有一篇关于雅虎第2部分的文章(以及描述Yandex也荣誉<noindex>
6的文章).在这方面googleoff:
,也看到了这个答案,以及我从中获取了大部分相关信息的文章.3
此外,Google网站管理员工具建议将rel=nofollow
属性4用于特定链接(例如广告或指向无法访问/对机器人有用的页面的链接,例如登录/注册).这意味着,HTML机器人应该尊重HTML属性 - 虽然这主要与网页排名有关,而与搜索索引本身无关.不幸的是,似乎没有rel=noindex
5,7.我也不确定这个属性是否也可以用于其他元素(例如<DIV REL="noindex">
); 但除非爬虫尊重"noindex",否则这也没有意义.
进一步参考:
REL="noindex"
一个标准,而不是与任何HTML标记一起使用,例如DIV/SPAN/P /一个!)1 维基百科:Noindex
2 您的网页哪些部分可能会被搜索引擎忽略?
3 告诉Google不要将您网页的某些部分编入索引
4 使用rel ="nofollow"获取特定链接
5 使用它是个好主意<a href=“http://name.com” rel=“noindex, nofollow”>name</a>
吗?
6 使用HTML标签 - Yandex.Help.网站管理员
7 现有的REL值
您可以通过将这些部分放在被robots.txt阻止的iframe中来阻止Google查看部分网页.
的robots.txt
Disallow: /iframes/
Run Code Online (Sandbox Code Playgroud)
的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>
Run Code Online (Sandbox Code Playgroud)
/iframes/hidden.html
Search engines cannot see this text.
Run Code Online (Sandbox Code Playgroud)
您可以使用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>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
18599 次 |
最近记录: |