3

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:

Google SDTT: 1 error

https://coda-resume.herokuapp.com/ (All values provided for http://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.)

unor
  • 92,415
  • 26
  • 211
  • 360
rj487
  • 4,476
  • 6
  • 47
  • 88
  • 1
    Possible duplicate of [Google SDTT error: "All values provided for http://www.example.com/ must have the same domain."](http://stackoverflow.com/questions/40279203/google-sdtt-error-all-values-provided-for-http-www-example-com-must-have-th) – unor Nov 15 '16 at 13:51

5 Answers5

11

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.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • It seems a bug. I thought I don't have this error one month age. – rj487 Nov 03 '16 at 17:07
  • BTW, so I only need to add this `JSON-LD`, google search can help me to add information when people search my website? – rj487 Nov 03 '16 at 17:09
  • I think Google’s SDTT throws this error only since a few weeks; they probably changed something, which had this side effect. -- I don’t understand your second comment. If this is really bug, you don’t have to do anything. Google will hopefully fix their SDTT at some point. – unor Nov 03 '16 at 18:53
  • Oh, I mean I've put this code in `head` element, should I do something else, so Google will display my company's card when people search my company. – rj487 Nov 04 '16 at 02:06
  • @CodaChang: If that’s what Google documents on the page you linked to, yes, why not? If you stil have a questions about their rich result, you could ask a new question. – unor Nov 04 '16 at 07:53
  • Thanks, I am just feeling a little bit confused about its policy. – rj487 Nov 04 '16 at 17:47
3

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.

Jon Adams
  • 24,464
  • 18
  • 82
  • 120
1

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>
JunaidFarooqui
  • 460
  • 5
  • 17
0

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

-1

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!

Racil Hilan
  • 24,690
  • 13
  • 50
  • 55
  • While it might resolve the error, this is incorrect. The schema.org reference gives information on the keys in the rest of the script. – Adrian Sep 18 '17 at 14:33