SDTT中的ItemList错误:“为url提供的所有值必须指向同一页面”

问题描述 投票:1回答:1

我正在尝试在文章页面上添加ItemList Schema.org标记,该文章页面列出了前10个软件,其中包含指向它们的(外部)链接。

当我在SDTT上测试以下JSON-LD标记时,我收到了错误消息

url提供的所有值必须指向同一页面

我真的不明白为什么单个列表项应该使用相同的URL?!

{
  "@context": "http://schema.org",
  "@type": "ItemList",
  "name": "Title of the page",
  "description": "Description goes here",
  "itemListElement": [
    {
      "@type": "ListItem",
      "position": 1,
      "item": {
        "name": "Product 1",
        "image": "https://www.product-1.com/image",
        "URL": "https://www.product-1.com"
      }
    },
    {
      "@type": "ListItem",
      "position": 2,
      "item": {
        "name": "Product 2",
        "image": "https://www.product-2.com/image",
        "URL": "https://www.product-2.com"
      }
    }
  ]
}
</script>

我在"item": {中使用了一个略有不同的标记而没有https://developers.google.com/search/docs/guides/mark-up-listings,但是这次我收到一条错误消息

url提供的所有值必须具有相同的域

你能帮我解决一下这个问题吗?

{
  "@context":"https://schema.org",
  "@type":"ItemList",
  "name": "Title of the page",
  "description": "Description goes here",
  "itemListElement":[
    {
      "@type":"ListItem",
      "position":1,
        "name": "Product 1",
        "image": "https://www.product-1.com/image",
        "URL": "https://www.product-1.com"
    },
    {
      "@type":"ListItem",
      "position":2,
        "name": "Product 2",
        "image": "https://www.product-2.com/image",
        "URL": "https://www.product-2.com"
    }
  ]
}
schema.org json-ld google-rich-snippets
1个回答
3
投票

这些错误与谷歌的Carousels功能有关。此功能requires某些url值:

  • 如果在摘要页面上使用,则列表中的所有URL都必须指向同一域中的不同页面。
  • 如果在一体化页面列表中使用,则所有URL都必须指向托管列表结构化数据的页面。

您的案例(链接到外部网站)根本没有资格在Google搜索中获取“轮播”功能。您可以(并且应该)像这样保留您的JSON-LD并忽略SDTT中的这些错误。

© www.soinside.com 2019 - 2024. All rights reserved.