Google SDTT error: "All values provided for http://www.example.com/ must have the same domain."

google-rich-snippets, json-ld, schema.org, url

Solution

It appears the testing tool assumes example.com as its domain.

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>

Problem

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` (All values provided for `http://www.example.com/` must have the same domain.) Why is Google's own documentation example giving an error? Code snippet from Google’s documentation: ``` <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> ```

Original source