Google structured data error: “All values provided for http://www.example.com/ must have the same domain.”

て烟熏妆下的殇ゞ 提交于 2019-11-28 01:32:25
unor

This is likely a bug in Google’s Structured Data Testing Tool.

(When removing the contactPoint property, the tool no longer reports an error, although the snippet still contains the same url value.)

See DieterDP’s answer in a related question.

Linh Phạm

I get this error:

<script type="application/ld+json">
{{
  "@context": "http://schema.org",
  "@type": "Organization",
  "Url": "http://www.your-company-site.com",
  "Logo": "http://www.example.com/logo.png",
  "ContactPoint": [{
    "@type": "ContactPoint",
    "Telephone": "+ 1-401-555-1212",
    "ContactType": "customer service"
  }]
}
</script>

If you use https://www.thegioididong.com for example:

<script type="application/ld+json">
{{
  "@context": "http://schema.org",
  "@type": "Organization",
  "Url": "https://www.thegioididong.com/",
  "Logo": "https://www.thegioididong.com/logo.png",
  "ContactPoint": [{
    "@type": "ContactPoint",
    "Telephone": "+ 1-401-555-1212",
    "ContactType": "customer service"
  }]
}
</script>

You will get the following errors in the testing tool:

https://www.thegioididong.com/ (All values ​​provided for https://search.google.com/structured-data/testing-tool/ must have the same domain.)

This happens because you the code is not on the web before checking.

Upload the code to the website, then check back in the testing tool. Now you won't get any more errors.

i was thinking it's a bug and trying to found solution, but this is not a bug at least we can't aspect from Google this kind of small bug. Basically error is saying (All values provided for https://search.google.com/structured-data/testing-tool/ must have the same domain.) so it's mean Google Tester aspecting URL value is "https://search.google.com/structured-data/testing-tool/" so if you try this code with your information just keep remain URL value as it is, you will find it working and 0 error.

 <script type='application/ld+json'> {"@context": "http://www.schema.org","@type": "Organization","name": "Your Company Name","url": "https://search.google.com/structured-data/testing-tool/","logo": "https://cdn.com/cms/assets/companylogo.svg","contactPoint": {"@type": "ContactPoint","telephone": "+90 00 000 00","contactType": "Customer Service"}}</script>

Ignore error at the Development level, On Live Production it works fine, may be because, Google’s Structured Data Testing Tool consider Live Domain

George Véras

I've just realized that the error comes from the @context property.

Try changing "http://schema.org" to your site's URL, Google stops showing that error, and yes! That's WRONG! What characterizes a bug in the Google Tool!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!