gpt4 book ai didi

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

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:39:51 24 4
gpt4 key购买 nike

我想将 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>

它不包含任何类型,但谷歌认为评级是:https://www.google.de/search?q=site%3A1averbraucherportal.de+ernaehrung

我的问题:

  • 如果我想在 Google 的搜索结果中显示星标,那么如果我使用 JSON-LD 而不是微数据,一般情况下可以省略类型吗?
  • 我是否误解了 Google 的指南?

最佳答案

有问题的网站确实为要评级的项目提供了一种类型:文章

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

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

(请注意,HTML 无效。)

如果您不为父元素提供 itemscope,则 HTML+Microdata 将无效。但是仅提供 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 搜索将显示其富媒体搜索结果。他们有自己的规则,即使他们有时会显示不遵守这些规则的内容,这也可能取决于各种未知因素,并且随时可能发生变化。

关于seo - Google 是否需要 schema.org 的 AggregateRating 类型才能在搜索结果中显示星星?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40398929/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com