gpt4 book ai didi

url - 谷歌 SDTT 错误 : "All values provided for http://www.example.com/must have the same domain."

转载 作者:行者123 更新时间:2023-12-03 21:43:53 24 4
gpt4 key购买 nike

当我复制/粘贴时 JSON-LD example from Google Documentation (下面的代码片段)我在 Structured Data Testing Tool 中遇到错误:

http://www.your-company-site.com (All values provided for http://www.example.com/ must have the same domain.)



为什么 Google 自己的文档示例会出错?

谷歌文档中的代码片段:

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "http://www.your-company-site.com",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "customer service"
}]
}
</script>

最佳答案

看来测试工具假定 example.com 作为其域。

在测试您是否可以将您的网址更新为“www.example.com”时,它将成功验证。

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "http://www.example.com/",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "customer service"
}]
}
</script>

关于url - 谷歌 SDTT 错误 : "All values provided for http://www.example.com/must have the same domain.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40279203/

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