2

I'm wondering what the effects/benefits/issues are with linking Website and Organization structured data (specifically in JSON-LD).

On the homepage of my site I have something like this:

<script type='application/ld+json'>
[{
    "@context":"http://schema.org",
    "@type":"Organization",
    "@id":"https://example.com/",
    "url":"http://example.com",
    "name":"My site",
    "logo":"https://example.com/logo.jpg",
    "sameAs": [
        "https://www.facebook.com/example/",
        "https://twitter.com/example"
    ]},
    {
        "@context":"http://schema.org",
        "@type":"WebSite",
        "@id":"https://example.com/",
        "url":"https://example.com",
        "name":"My Site",
        "potentialAction":{
            "@type":"SearchAction",
            "target":"https://example.com?searchQuery={search_term_string}",
            "query-input":"required name=search_term_string"
        }
}]
</script> 

In this case I've connected the Website and Organization with the same ID. I've noticed in the Structured Data Tool, Google will combine this into one data type:

Screenshot of Structured Data Testing results

I'm using Website for the potential benefits of the site search box and I'm using Organization for the benefits of contact point and linking to social accounts.

My question is: is this a good idea? Is there any reason to not connect these two items in structured data? What implications are there to link these items vs. keeping them as separate IDs?

  • 1
    Why do you want to give them the same @id? – unor Apr 15 at 1:01
  • @unor - I think that's mainly my question - is there a reason I shouldn't link these via ID and keep them separate? What are the implications? – StuFu Apr 15 at 2:07
  • Here stackoverflow.com/questions/48294593/… @unor has explained it perfectly, you can combine multiple schema without having separate file for each. – Deepak Mathur Apr 15 at 6:44
3

Same @id?

If items have the same @id, they are the same. These two snippets are semantically equivalent:

[
  {
    "@context": "http://schema.org",
    "@type": "Organization",
    "@id": "https://example.com/"
  },
  {
    "@context": "http://schema.org",
    "@type": "WebSite",
    "@id": "https://example.com/"
  }
]
{
  "@context": "http://schema.org",
  "@type": ["Organization", "WebSite"],
  "@id": "https://example.com/"
}

But are the organization and its website the same thing? I would say no. Examples that show why these are different entities:

  • Others might want to make statements only about the website or only about the organization. For example, if someone states <#i> ex:likes <https://example.com/> ., maybe they actually only like the website, but not the organization. If both were the same, it wouldn’t be possible to differentiate.

  • An organization might have multiple websites (e.g., per language), but if the organization and all of its websites would be the same entity, it would not be possible to associate the different url values with the corresponding inLanguage values. Each language version should get its own WebSite item (example).

A different @id for each thing

I would recommend to give your Organization its own @id, for example:

{
  "@type": "Organization",
  "@id": "https://example.com/#org",
  "url": "https://example.com/"
}

If you want to go the extra mile, you could even give your WebSite its own @id, so that it can be differentiated from the homepage:

{
  "@type": "WebSite",
  "@id": "https://example.com/#site",
  "url": "https://example.com/"
}
{
  "@type": "WebPage",
  "@id": "https://example.com/",
  "url": "https://example.com/"
}

Linking Organization and WebSite

You can associate the organization and its website(s) with suitable properties like author/creator, copyrightHolder, and/or publisher, as well as mainEntity/about.

(JSON-LD example)

  • Such a fantastic answer, thanks @unor. – StuFu Apr 15 at 17:07
  • @unor (related to the last paragraph) For an online seller, is the property provider more appropriate (than publisher) to connect these 2 relations a) WebSite with Organization, and b) page (ItemPage/CollectionPage/...) with Organization? – Ethan Collins Jun 14 at 17:45
  • @EthanCollins: If both properties make sense, I would use both. – unor Jun 14 at 18:58

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.