Google的<noindex>标记</noindex>

时间:2013-03-28 15:02:21

标签: seo googlebot yandex noindex

我想告诉Google不要为网页的某些部分编制索引。在Yandex(俄语SE),有一个非常有用的标签叫<noindex>。如何用Google完成?

4 个答案:

答案 0 :(得分: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-->

不幸的是,他们似乎无法就单一标准达成一致 - 据我所知,没有什么可以让所有蜘蛛脱离......

googleoff:评论似乎支持不同的选项,但我不确定哪里有完整的列表。至少有:

  • all:完全忽略块
  • 索引:内容不会进入Google的索引
  • anchor:链接的锚文本不会与目标页面关联
  • 摘录:文字不会用于为搜索结果创建摘要

请注意(至少对谷歌而言)这只会影响搜索索引,而不会影响页面排名等。此外,正如Stephen Ostermiller在下面的评论中正确指出的那样,不幸的是,googleongoogleoff only work with the Google search appliance and have no effect on normal Googlebot

还有一篇关于雅虎部分 2 的文章(以及描述Yandex也尊重<noindex> 6 的文章。在googleoff:部分,另见this answer,文章我从大多数相关信息中获取了。 3


此外,Google Webmaster Tools建议使用rel=nofollow属性 4 来获取特定链接(例如广告或指向无法访问/对机器人有用的网页的链接,例如登录/注册)。这意味着,HTML a rel Attribute应该受到谷歌机器人的尊重 - 尽管这主要与网页排名有关,而与搜索索引本身无关。不幸的是,似乎没有rel=noindex 5,7 。我也不确定这个属性是否也可以用于其他元素(例如<DIV REL="noindex">);但除非爬虫尊重“noindex”,否则这也没有意义。


进一步参考:


1 Wikipedia: Noindex
2 Which Sections of Your Web Pages Might Search Engines Ignore?
3 Tell Google to Not Index Certain Parts of Your Page
4 Use rel="nofollow" for specific links
5 Is it a good idea to use <a href=“http://name.com” rel=“noindex, nofollow”>name</a>?
6 Using HTML tags — Yandex.Help. Webmaster
7 existing REL values

答案 1 :(得分:7)

您可以通过将这些部分放入被robots.txt阻止的iframe来阻止Google查看部分网页。

的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/hidden.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>

答案 2 :(得分:3)

不,Google does not support the <noindex> tag。实际上没有人这样做。

答案 3 :(得分:-4)

在根级别创建robots.txt文件,并插入如下内容:

阻止谷歌:

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

相关问题