1

I have a website, a blog, and several social media profiles. I want to explain the relation between these online presences to search engines using Schema.org.

From the documentation and from examples on Google, I know that the following code connects the website and the social media profiles to my name:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Person",
  "name": "your name",
  "url": "http://www.your-site.com",             //  <= homepage
  "sameAs": [
    "http://www.facebook.com/your-profile",
    "http://instagram.com/yourProfile",
    "http://www.linkedin.com/in/yourprofile",
    "http://plus.google.com/your_profile"
  ]
}
</script>

But what is the correct way to claim a blog?

There are types and properties on Schema.org relating to blogs, but these are used for marking up the contents of the blog in relation to the blog itself. What I want is to mark up the relation of the blog to the other online presences on the home page of my personal website. How do I do that?

It seems to me that I cannot use url, as that is the "URL of the item", i.e. my personal home page; and I cannot use sameAs, as that is the "URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website." According to Google, the social media links have to go here.

On the other hand, the definition of sameAs continues on schema.org to include "[e].g. the URL of the item's Wikipedia page, Freebase page, or official website". The latter indicates to me that I could (or should) put the whole schema on my blog, have the blog address as url and my home page address as sameAs, like this:

<script type="application/ld+json">
{
  "@context": "http://schema.org",
  "@type": "Person",
  "name": "your name",
  "url": "http://my.blog.com",                   //  <= blog
  "sameAs": [
    "http://www.facebook.com/your-profile",
    "http://instagram.com/yourProfile",
    "http://www.linkedin.com/in/yourprofile",
    "http://plus.google.com/your_profile",
    "http://www.my-website.com",                 //  <= homepage
  ]
}
</script>

But I cannot find any example for this, or how else do to it.

unor
  • 92,415
  • 26
  • 211
  • 360

1 Answers1

0

I think there is no reason to handle the blog (which, if not integrated in your primary site, is also a kind of website) differently from how you handle the primary website, assuming that both are personal sites (i.e., representing you in some way), whether you use contactPoint, sameAs, or url.

There is also another way, and this one allows you to provide data about the URLs (e.g., to make the relationship clear):

WebSite (as well as Blog) allows you to reference a Person item with properties like:

If you don’t want to provide top-level objects for WebSite/Blog, you could use JSON-LD’s @reverse keyword:

{
  "@context": "http://schema.org",
  "@type": "Person",
  "name": "John Doe",
  "@reverse": {
    "author": 
    [
      {
        "@type": "WebSite",
        "url": "https://example.com/"
      },
      {
        "@type": ["Blog", "WebSite"],
        "url": "https://blog.example.com/"
      }
    ]         
  }
}

But using multiple top-level objects (e.g., with @graph), each with its @id, is more flexible.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • Thank you. The primary purpose of the code is to present Google with the structured data they need to create a Knowledge panel in their search results. I'm not sure how far I may deviated from the example they provide in their guide (linked in the question). The other thing is that I would like my sites in hierachical order. Think of my home address and other addresses associated with me, such as where I work, where my children and family live, the sports club where I am a trainer, etc. The website is a hub for me, like my home address. Can I represent such a hierachy and still satisfy Google? –  Jun 07 '16 at 13:10
  • 1
    @what: Ah sorry, I missed that your intention was to comply with Google’s "Social Profile Links". Following their documentation, it seems that you really have no other option than to use `url` for your site or blog (or maybe both; their doc. is not detailed enough if that’s supported or which one of the URLs they would display in that case). As they list which services are supported for "social media profile pages" in `sameAs`, my guess is that your blog or site specified with `sameAs` wouldn’t be picked up by Google for this specific feature. – unor Jun 07 '16 at 14:25
  • @what: That said, you could of course use both methods (providing the URLs in `url`/`sameAs`, and providing separate items for the website/blog with the same `url` value); but for "Social Profile Links", Google will likely ignore the latter. -- About the part with the hierarchy: I’m not sure I understand. Do you mean providing multiple addresses and making clear somehow what these addresses represent (e.g., home address, work address etc.)? Or do you need an actual hierarchy? – unor Jun 07 '16 at 14:28
  • Thank you for the time you're taking to help me. With "hierarchy" I just mean that one address (my website) is the "official home address", and that all others are "subsidiaries" or "secondary addresses". Sort of like you expect people to ring the door bell at your front door and not come knocking at the back door, unless they deliver goods to the kitchen (so you'll have a sign showing the way to the back for those that you don't want to tread their dirty shoes across your carpet). –  Jun 08 '16 at 06:19
  • @what: Not in a machine-readable way. You could clarify which address takes priority in `contactType` (or in `description`, or maybe even in `disambiguatingDescription`), but this would probably only be understood by humans. – unor Jun 08 '16 at 18:14
  • Thank you for all that, that was very helpful. –  Jun 09 '16 at 09:52