Recently we got an "data-vocabulary.org schema deprecated and not supported by Google anymore. Please migrate to using schema.org types." error validating one of our website pages. The same error we got in Google Search Console.

data-vocabulary.org schema is deprecated and not supported by Google anymore. Please migrate to using schema.org types

This "data-vocabulary.org schema deprecated" error is related to the breadcrumbs structure data. We used "data-vocabulary.org/Breadcrumb" schema for the structured data, but Google support it no longer. 

You may also receive this error starting from April 6, 2020, in case you haven't converted your structured data scheme from data-vocabulary.org to schema.org.

Before we get to the point of how to fix the "data-vocabulary.org schema deprecated" error, let's make a few things clear.

What is Structured Data?

It is a specific HTML or JSON code on the web-page that helps search engine robots to analyze the page easier and structure the content for better understanding. When your page has a lot of elements it is hard for search engines (e.g. Google) to know where exactly the breadcrumb or the other element is. 

Structured data solve this problem. With its help, you can directly tell Google robot where the breadcrumbs, product name, price, SKU, description, or other elements are. 

What are data-vocabulary.org and schema.org?

Data-vocabulary.org and schema.org are the sets of extensible schemas (structured data formats) used to "construct" the webpage in a way for search engines to analyze and understand it better.

Why did Google decide to support only schema.org structured data?

On January 21, 2020, Google announced sunsetting support for data-vocabulary. There are 2 main reasons why Google decided to stop supporting data-vocabulary.org:

  1. Schema.org is more popular and used 
  2. Google wants to focus its development on a single SD scheme

That is why Google decided to use only one single structured data (SD) for search results features and enhancements and focus on the schema.org.

Once Google announced the end of support for data-vocabulary.org it started sending notices to encourage webmasters to restructure their data to schema.org. Just after the announcement, people started seeing warnings in Search Console about broken breadcrumbs. However, after April 6, they started getting errors at that matter.

How to fix “data-vocabulary.org schema deprecated” error?

As it was previously said, structured data is a special code on your website, so, basically, you just need to update the breadcrumb template on your website to fix the “data-vocabulary.org schema deprecated” error. We will show you how we did this on magefan.com which is built on Magento 2.

First, you need to find the proper template file. If you use Magento 2 as we do, then the template path hints will help you to do this.

Before the changes, the breadcrumb template file looked like this one and contained the "data-vocabulary.org" schema:

<?php if ($crumbs && is_array($crumbs)) : ?>
    <div class="breadcrumbs clearfix">
        <ul class="items pull-right">
            <?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
                <li class="item <?php /* @escapeNotVerified */ echo $crumbName ?>" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb">
                     <?php if ($crumbInfo['link']) : ?>
                           <a  href="<?php /* @escapeNotVerified */ echo $crumbInfo['link'] ?>" title="<?php echo $block->escapeHtml($crumbInfo['title']) ?>" itemprop="url">
                                <span itemprop="title"><?php echo $block->escapeHtml($crumbInfo['label']) ?></span>
                           </a>
                     <?php elseif ($crumbInfo['last']) : ?>
                      <strong><?php echo $block->escapeHtml($crumbInfo['label']) ?></strong>
                 <?php else: ?>
                  <?php echo $block->escapeHtml($crumbInfo['label']) ?>
                  <?php endif; ?>
                 </li>
            <?php endforeach; ?>
        </ul>
    </div>
<?php endif; ?>

Using the schema.org/BreadcrumbList documentation we changed it to:

<?php if ($crumbs && is_array($crumbs)) : ?>
<?php $position = 1; ?>
<div class="breadcrumbs clearfix">
<ul class="items pull-right" itemscope itemtype="https://schema.org/BreadcrumbList">
<?php foreach ($crumbs as $crumbName => $crumbInfo) : ?>
<li class="item <?php /* @escapeNotVerified */ echo $crumbName ?>" <?php if ($crumbInfo['link']) { ?>itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"<?php } ?>>
<?php if ($crumbInfo['link']) : ?>
<a href="<?php /* @escapeNotVerified */ echo $crumbInfo['link'] ?>" title="<?php echo $block->escapeHtml($crumbInfo['title']) ?>" itemprop="item">
<span itemprop="name"><?php echo $block->escapeHtml($crumbInfo['label']) ?></span>
<meta itemprop="position" content="<?= $position++ ?>" />
</a>
<?php elseif ($crumbInfo['last']) : ?>
<strong><?php echo $block->escapeHtml($crumbInfo['label']) ?></strong>
<?php else: ?>
<?php echo $block->escapeHtml($crumbInfo['label']) ?>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

Here is how the changes look in GIT:

data-vocabulary.org schema is deprecated fix

To make sure the issue is fixed use the Structured Data Testing Tool by Google. Here is how our page looks like once we applied the fix (no errors):
schema.org BreadcrumbList

Remember, the better-structured data is on your website, the easier it is for Google to analyze it. So, it is advisable to fix the "data-vocabulary.org schema deprecated" error before it affects your website SEO.