Google SDTT 错误:“为 http://www.example.com/提供的所有值必须具有相同的域." [英] Google SDTT error: "All values provided for http://www.example.com/ must have the same domain."
问题描述
当我复制/粘贴 Google 文档中的 JSON-LD 示例(代码-下面的代码段)我在结构化数据测试工具中遇到错误:
When I copy/paste JSON-LD example from Google Documentation (code-snippet below) I get an error in the Structured Data Testing Tool:
http://www.your-company-site.com
(为http://www.example.com/
必须具有相同的域.)
http://www.your-company-site.com
(All values provided forhttp://www.example.com/
must have the same domain.)
为什么 Google 自己的文档示例会出错?
Why is Google's own documentation example giving an error?
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 作为其域.
It appears the testing tool assumes example.com as its domain.
在测试您是否可以将您的网址更新为www.example.com"时,它将成功验证.
When testing if you can update your url to "www.example.com" it will validate successfully.
<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>
这篇关于Google SDTT 错误:“为 http://www.example.com/提供的所有值必须具有相同的域."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!