I want to add Corporate Contacts in Google Search. I test the following code in Google's Structured Data Testing Tool, but it threw this error:
https://coda-resume.herokuapp.com/
(All values provided forhttp://www.example.com/
must have the same domain.)
Here is the JSON-LD:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "https://coda-resume.herokuapp.com/",
"logo": "http://www.example.com/logo.png",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+1-401-555-1212",
"contactType": "customer service"
}]
}
</script>
(I put this in the head
element.)
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 sameurl
value.)See DieterDP’s answer in a related question.
I get this error:
If you use
https://www.thegioididong.com
for example:You will get the following errors in the testing tool:
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.
Ignore error at the Development level, On Live Production it works fine, may be because, Google’s Structured Data Testing Tool consider Live Domain
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!
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.