Fix Invalid URL in field id Breadcrumbs Validation Error in Google Search Console

Updated on December 17, 2019

I recently received a notification from Google search console that reported about the breadcrumb validation error. Upon logging in, I saw thousands of URLs were reported with an error – Invalid URL in field id. Though, I was not sure what the error actually means, I was able to fix the issue and successfully validate the breadcrumb schema.

Before we discuss the solution, here’s the screenshot of the errors from the Google search console.

Fix Invalid URL in field id

What are Breadcrumbs? Why is it important?

Breadcrumbs are a way to help visitors to navigate through the site hierarchy. Google search uses the breadcrumb schema defined in the page source to categorize the content from the page in search results.

breadcrumbs in google

What is an Invalid URL in field id?

As I told earlier, “Invalid URL in field id” does not really explain the problem. So I had to use the Google Structured Data Testing Tool to understand what the actual issue is and that prompted me to check the breadcrumb inserted by the website theme.

Fix Invalid URL in field id breadcrumb error

Now I know where the issue is – the breadcrumb schema inserted by the theme is not in compliance with the guidelines defined by Google. In order to validate the breadcrumb, it has to be structured as specified in this article. Well, now I had two options – fix my theme code so that it generates breadcrumb properly or use the breadcrumb offered in Yoast SEO plugin.

As you guessed it right, I opted to use the breadcrumb from the Yoast SEO plugin (You want to know the reason? Because I just love this plugin)

How to enable Breadcrumb in Yoast SEO plugin

To enable breadcrumb, go to SEO > Search Appearance and click the “Breadcrumbs” tab as shown in the below screenshot.

yoast seo breadcrumb enable

To insert the Yoast SEO breadcrumb, you will have to edit your theme source code. If you are not sure how to edit the theme files, you need to contact your theme developer. Copy & paste the following code in your theme where you want the breadcrumbs to be shown.

<?php if ( function_exists('yoast_breadcrumb') ) {
            yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); 
      } 
?>

Now you can see the breadcrumb on your website, which is structured and compliance as per Google. Now go ahead and test it with the Google Structured Data Test Tool, and you’ll see no errors!

Was this article helpful?

Related Articles

Leave a Comment