Missing field “url” (optional) in Rich result test
If you have created your blog website on Blogger, and when you test the URL of any post on your website for Rich result in Google’s tool Rich result test, then you will see a warning in it. That warning is related to the article schema of your post. That warning states that the URL is missed in the author section of your post’s article schema, and the Missing field “url” (optional) message appears there. This error appears due to a coding error in the blogger theme, whether you are using a premium theme or a free one, and every blogger has to face this problem. Some people try to solve this problem but are unable to do so because they do not have complete knowledge to solve this problem.
To fix the Missing field “url” (optional), you must first understand the article schema, because this mistake occurs within the article schema script itself, correcting the same fixes this error or warning. So first you understand the article schema.
What is Article Schema Markup
There is a script within the Blogger theme that generates only the schema markup of each blog post, that is, the script that generates the article schema markup of the blog post or article is called the ‘Article schema markup script’. It is placed in the body section of the blog theme. This script does not create the article schema markup of the blog’s home page and pages, because the article schema markup is created only for the blog-post.
Article schema markup mainly consists of “web page details”, “web page author details”, “web page publisher details”. However, in Article schema markup where the warning of Missing field “url” (optional) appears, the author’s profile URL is blank.
Fix Missing field “url” (optional) in Reach Result Test
Generally, blog themes whose article schema markup script has the author url blank, those themes have any one of the following codes. In some themes, the article schema markup script is applied twice. In blog themes that have the article schema markup script applied twice, modifying the other code fixes the Missing field “url” (optional) warning. The article schema markup script with the missing field”url” (optional) warning is as follows —
Type 1.
Some blogger themes have this ‘Article schema markup script’ with Missing field “url” (optional)–
<b:include data='post' name='postMetadataJSON'/>
Type 2.
Some blogger themes have this ‘Article schema markup script’ with Missing field “url” (optional)–
<script type='application/ld+json'>{"@context":"https://schema.org","@type":"NewsArticle","mainEntityOfPage":{"@type":"WebPage","@id":"<data:post.url.canonical.jsonEscaped/>"},"headline":"<data:post.title.jsonEscaped/>","description":"<data:post.snippets.short.jsonEscaped/>","datePublished":"<data:post.date.iso8601.jsonEscaped/>","dateModified":"<data:post.lastUpdated.iso8601.jsonEscaped/>","image":{"@type":"ImageObject",<b:if cond='data:post.featuredImage.isResizable'>"url":"<b:eval expr='resizeImage(data:post.featuredImage, 1200, "1200:675")'/>","height":675,"width":1200<b:else/>"url":"https://lh3.googleusercontent.com/ULB6iBuCeTVvSjjjU1A-O8e9ZpVba6uvyhtiWRti_rBAs9yMYOFBujxriJRZ-A=w1200","height":348,"width":1200</b:if>},"author":{"@type":"Person","name":"<data:post.author.name.jsonEscaped/>"},"publisher":{"@type":"Organization","name":"Blogger","logo":{"@type":"ImageObject","url":"https://lh3.googleusercontent.com/ULB6iBuCeTVvSjjjU1A-O8e9ZpVba6uvyhtiWRti_rBAs9yMYOFBujxriJRZ-A=h60","width":206,"height":60}}}</script>
Type 3.
Some blogger themes have this ‘Article schema markup script’ with Missing field “url” (optional)–
<script type='application/ld+json'>{"@context":"https://schema.org","@type":"NewsArticle","mainEntityOfPage":{"@type":"WebPage","@id":"<data:post.url.canonical.jsonEscaped/>"},"headline":"<data:post.title.jsonEscaped/>","description":"<data:post.snippets.short.jsonEscaped/>","image":["<data:post.featuredImage.jsonEscaped/>"],"datePublished":"<data:post.date.iso8601.jsonEscaped/>","dateModified":"<data:post.lastUpdated.iso8601.jsonEscaped/>","author":{"@type":"Person","name":"<data:post.author.name.jsonEscaped/>"},"publisher":{"@type":"Organization","name":"<data:blog.title/>","logo":{"@type":"ImageObject","url":"https://lh3.googleusercontent.com/ULB6iBuCeTVvSjjjU1A-O8e9ZpVba6uvyhtiWRti_rBAs9yMYOFBujxriJRZ-A=h60","width":206,"height":60}}}</script>
Your blog theme will also have one of these three types of scripts. These are all input type scripts. You can see their output by View page source .
In these Article schema markup script there is mainly one mistake and in advance there are three to four mistakes. These scripts typically have a blank URL, and the organization name in the publisher section instead of your website name as Blogger.
Since before making any modifications to the theme, take a backup of the theme, so that you can restore the backup theme in case of any kind of error and if the error is not understood.
Identify the script in your theme from the above script and replace that script with this ‘Article schema markup script’ given below.
<script type='application/ld+json'>{"@context": "http://schema.org","@type": "NewsArticle","mainEntityOfPage": {"@type": "WebPage","@id": "<data:post.url.canonical.jsonEscaped/>"},"headline": "<data:post.title.jsonEscaped/>","description": "<data:view.description.escaped/>"datePublished": "<data:post.date.iso8601.jsonEscaped/>","dateModified": "<data:post.lastUpdated.iso8601.jsonEscaped/>","image": {"@type": "ImageObject","url": "<b:eval expr='(data:post.featuredImage ? resizeImage(data:post.featuredImage, 1200, "1200:630") : "your-logo-image-URL").jsonEscaped'/>", "height": <b:eval expr='data:post.featuredImage ? 630 : 348'/>, "width": 1200},"publisher": {"@type": "Organization","name": "<data:blog.title/>","logo": {"@type": "ImageObject","url": "your-logo-image-URL", "width": 206, "height": 60}},"author": {"@type": "Person", "name": "<data:post.author.name.jsonEscaped/>","url": "<data:post.author.profileUrl.jsonEscaped/>","image": "<data:post.author.authorPhoto.image.jsonEscaped/>"}}</script>
Now instead of your-logo-image-URL, add the URL of your site’s logo and then Save the theme.
Your Missing field “url” (optional) problem has been fixed. Now you can test the URL of your blog post by using Rich Result Test and Schema Markup Validator.
Conclusion
With the help of this article, you have fixed the Missing field “url” (optional) problem of your blog post’s article schema markup. If you are not able to find article schema markup script in your blog theme to solve this problem then you can take help from us. If you encounter any errors in fixing this problem, feel free to let us know. Whether your problem is solved or not, please write it in the comment box below.
Able People Encourage Us By Donating : सामर्थ्यवान व्यक्ति हमें दान देकर उत्साहित करें।
Thanks for reading: Fix to missing field url (optional) in blogger, Please, share this article. If this article helped you, then you must write your feedback in the comment box.