Google是否需要schema.org&#39的AggregateRating类型才能在搜索结果中显示星标?

时间:2016-11-03 10:16:47

标签: seo schema.org microdata google-rich-snippets

我想在我的网站上添加AggregateRating信息,以便在Google的搜索结果中显示星标。

在Google的开发网站it says上,这只适用于五种不同的评论类型:

  • 当地企业
  • 图书
  • 音乐
  • 产品

就我而言,这些类型都没有描述我网站上的评分。但是,我发现一个网站没有在其标记中定义任何类型,但AggregateRating仍显示在Google的搜索结果中。

网站https://www.1averbraucherportal.de/ernaehrung包含以下标记:

<div style="display: none;" itemprop="aggregateRating" itemscope="" itemtype="http://schema.org/AggregateRating">
    <meta itemprop="bestRating" content="5">
    <meta itemprop="worstRating" content="1">
    <meta itemprop="ratingValue" content="3.46">
    <meta itemprop="ratingCount" content="158">
</div>

它不包含任何类型,但Google会考虑评级:https://www.google.de/search?q=site%3A1averbraucherportal.de+ernaehrung

我的问题:

  • 如果我想在Google的搜索结果中使用星标,我是否可以省略一般类型,也可以使用JSON-LD而不是Microdata?
  • 我是否误解了谷歌的指南?

1 个答案:

答案 0 :(得分:1)

有问题的网站确实为评分为Article的商品提供了类型。

在您的示例中,aggregateRating是值为AggregateRating的属性。此属性属于另一个项目,即具有itemscope属性的最近父元素。因此,他们页面中的完整相关标记是:

<span itemscope itemtype="http://schema.org/Article">
  <!-- … -->
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <!-- … -->
  </div>
</span>

(请注意,HTML无效。)

如果您不提供带有itemscope的父元素,则HTML +微数据将无效。但是,仅提供itemscope属性是可能且有效的,不具有itemtype属性。

因此aggregateRating属性可能属于未指定此项代表内容的项目:

<div itemscope>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <!-- … -->
  </div>
</div>

但你也可以使用Schema.org的Thing类型(所有Thing):

<div itemscope itemtype="http://schema.org/Thing">
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <!-- … -->
  </div>
</div>

尽管如此,所有这些并不意味着Google搜索会显示其丰富的搜索结果。他们有自己的规则,即使他们有时会显示不符合这些规则的内容,这可能取决于各种未知因素,而且可能会在任何一天发生变化。