【问题标题】:What does the link rel="index" thing do?链接 rel="index" 的作用是什么?
【发布时间】:2011-08-06 21:49:22
【问题描述】:

像这样:

<link rel='index' title='mysite' href='http://mysite.com/' />

它出现在网站的所有页面中。

我希望它不会告诉谷歌不要索引该页面:|

还有一个

<link rel='canonical' title='mysite' href='http://mysite.com/' />

那是为了什么?

【问题讨论】:

    标签: html hyperlink seo


    【解决方案1】:

    &lt;link rel='index' title='mysite' href='http://mysite.com/' /&gt;

    它指出当前文档的链接文档provides an index……这可能不是真的。

    &lt;link rel='canonical' title='mysite' href='http://mysite.com/' /&gt;

    它指出http://mysite.com/ 是与当前文档相同的页面,并且要使用的正确 URL 是http://mysite.com/

    【讨论】:

    【解决方案2】:

    来自HTML4 specification

    索引
    引用为当前文档提供索引的文档。

    所以这将是您的主页。 (这与我们称之为“index.html”的原因相同。)

    Google Webmasters blog 表示“规范”提供了页面的首选 URL。

    【讨论】:

    • 不,我们称之为“index.html”的原因是因为它替代了自动生成的目录索引(列出了目录中的所有文件)。 start 会比 index 更频繁地应用于主页。
    【解决方案3】:

    link 元素上的rel 属性只是说“还有另一个文档,其 url 是与当前文档相关的href 属性的值。

    rel 使用的值有很多种,其中最常见的是stylesheet。在"index" 的情况下,这意味着这个其他文档以某种方式索引了这个文档。

    在 w3schools (http://www.w3schools.com/TAGS/att_link_rel.asp) 上有一个常见 rel 值列表。 (我不是 w3schools 的粉丝,但我想你可能想看看他们提供的 rel 值列表。)

    这是关于 Google 和 rel=canonical 的信息:http://www.google.com/support/webmasters/bin/answer.py?answer=139394

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-02-17
      • 1970-01-01
      • 2016-08-07
      • 2013-05-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-16
      相关资源
      最近更新 更多