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..

0

2 Answers 2

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.

4
  • Might it be recommended to specify an "ID" anyway regardless if you using a single format or multiple?
    – J Doe
    Commented Sep 7, 2018 at 23:27
  • @JDoe: Yes, it’s a good practice to provide IDs (no matter which syntax, or if you make use of the IDs somehow). See also: Why are identifiers useful?
    – unor
    Commented Sep 8, 2018 at 13:21
  • I see. Now would this be a valid ID for any markup type: https://example.com/fr/#i? So if you have the same ID but based on language page.
    – J Doe
    Commented Sep 8, 2018 at 22:19
  • @JDoe: In the best case, you use the URI of the page the thing is described on, and append a fragment (that differentiates the URI for the page from the URI for the thing). So if the page about Alice has the URI http://example.com/team/alice, you could use the URI http://example.com/team/alice#i for representing Alice herself. Could be any fragment, doesn’t have to be #i (#i is sometimes used for persons, while #this is sometimes used for objects).
    – unor
    Commented Sep 9, 2018 at 2:29
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.

2
  • 1
    In my experience it can be a bit random on which entity gets picked for rich snippets when there are more than one marked up. This can be an issue if some only have part if the information. This is not just when marking up in both json-ld and microdata, but often when say a product is marked up twice in json-ld, due to a review plugin. One is picked. so, if you do mark up more than once, make sure they are identical.Sometimes you need to, as not all systems support json-ld. Commented Sep 6, 2018 at 23:05
  • Good comment @TonyMcCreath, I am assuming a clean LD implementation with no duplications and same LD being sent with either method
    – Raul Reyes
    Commented Sep 7, 2018 at 0:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.