2

This Quora Answer: https://www.quora.com/Can-I-mix-microdata-and-JSON-LD/answer/Aaron-Bradley

The above answer from 2015 mentions there being a potential problem when marking up the same entity with JSON+LD and Microdata.

I am making a site that is hopefully SEO good for both Google and other search engines. Will I face a problem, in 2018, if I use both JSON+LD and Microdata to markup the exact same information on a page?

I understand that JSON+LD is the most recent recommended structured data to be used by Google. However, according to the official "do not"'s or "Make sure"'s, we are try to make sure that the structured data actually indicates something that is visible on the page. Also, I have read somewhere that JSON+LD is mainly for the knowledge graph -though that might be an outdated fact.

I would think that using both JSON+LD and Microdata for the exact same information would be a way to show that the structured data is marking up something "visible"/seen and what not as well as just make sure Google processes everything even if they do not act upon it in the way I may want, or at least right away. I.e, knowledge panels or other features.

Does it matter in 2018 if I use both JSON+LD and Microdata for the same information on a page? Or do I need to use one or the other for the same information just to be safe because Google has not revealed anything?

My website is largely static with the possibility of me implementing a blog with something like wordpress or django in the future as a separate part of my domain..

J Doe
  • 21
  • 3

2 Answers2

5

If you provide structured data about the same thing in different syntaxes, you should convey that it’s actually the same thing, not different things.

You can do this by giving all representations the same URI.

JSON-LD: @id
Microdata: itemid
RDFa: resource / about

<!-- JSON-LD -->
<script type="application/ld+json">
  {
    "@context": "http://schema.org",
    "@type": "Person",
    "@id": "#i",
    "name": "Alice"
  }
</script>

<!-- Microdata -->
<p itemscope itemtype="http://schema.org/Person" itemid="#i">
  <span itemprop="name">Alice</span>
</p>

<!-- RDFa -->
<p typeof="schema:Person" resource="#i">
  <span property="schema:name">Alice</span>
</p>

If you don’t give these representations the same URI, consumers might assume that your page describes three persons instead of one.

unor
  • 21,919
  • 3
  • 47
  • 121
1

Google recommends using either form but has not specifically stated that you can not use both.

If you have SEO concerns I would recommend to use only one. I believe that Google will choose the most reliable and accessible information and will discard other sources. If this is true, you will make your source code a little bit heavier, if linked data is generated by a script you will also be sending another server request to gather the data.

JSON-LD and microdata are accepted because each one provide a solution to certain situations when markups can not be altered or for other technical constraints/governance that does not allow you to generate JSON files.

Regarding Google knowledge graph, I would use JSON-LD if you have an ecommerce website and you can not use services such as Google My Business because you do not have a brick and mortar store.

In my opinion to Google is totally irrelevant what your decision would be, at the end of the day they only need one.

Raul Reyes
  • 2,484
  • 13
  • 22