4

The documentation from Google about structured data has the following snippet:

<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>

But this snippet produces a failure with validation (test here) on field url with the message:

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

So, I have the same error for my own information on my website but I don't understand what is the error and how to correct this.

Do you have any idea on about why this error happens?

  • Have you replace your-company-site.com name to your domain name? Paste out your website link on comment. – Goyllo Nov 15 '16 at 12:14
  • Yes I change it, you can test the linked validator with this snippet and there is the same error with any domain name. Also there is no reference on 'example.com' in the snippet but the error message has 'example.com'. I also notice that when we put "PostalAddress" instead of "ContactPoint", there is no more error. I don't understand why. – Prim Nov 15 '16 at 12:38
  • So, on your actual webpage, does the url match the domain on which the page is hosted? – MrWhite Nov 15 '16 at 13:13
2

As far as we know for now, this seems to be a bug in Google’s SDTT.

Even Google’s own example gives this error, and there is no error when omitting the contactPoint, although the url value stays the same.

Stack Overflow questions about the same issue:

  • I looked for similar question without find anything, but i miss some topics... Thanks. – Prim Nov 15 '16 at 15:12
  • It doesn't give the error here. It does if you use the single-page markup and then adjust it to have different URL paths for each item; but then you're not meant to be doing that. The single-page list is meant to be literally a single page with a list of visible content for each item which has an id="item1" , id="item2" etc, and the Google can provide a link to "example.com/page#item1" if you click the relevant carousel item. What they won't allow "/item1" and "/item2". Those are separate pages, not a "single-page list". You can't separate the visible content and the metadata. – GreenReaper Apr 17 at 15:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.