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

前端 未结 5 2170
自闭症患者
自闭症患者 2020-12-06 22:49

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:

相关标签:
5条回答
  • 2020-12-06 23:05

    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.

    0 讨论(0)
  • 2020-12-06 23:08

    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.

    0 讨论(0)
  • 2020-12-06 23:12

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

    0 讨论(0)
  • 2020-12-06 23:13

    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>
    
    0 讨论(0)
  • 2020-12-06 23:16

    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!

    0 讨论(0)
提交回复
热议问题