Blog by Debabratta Jena
Everything about structured data to rich snippets

How to add Structured data to LocalBusiness website

Published on Oct 21, 2020
We read webpages and comprehend its fundamental significance. In any case, for web crawlers, all website pages are a pile of information. Things being what they are, how web crawlers comprehend the hidden importance of a site page? For this, we need a mechanism to give the web crawlers some extra data about the pages. This extra data is called structured data which encourages web indexes to comprehend the hidden significance of a website page.

For instance, If we plan a page or blog about how to cook Hyderabadi Biryani, as a human we can without much of an effort comprehend that the page is about a food thing or a recipe. Yet, web crawlers do confront trouble in understanding the hidden significance of the page.

Take one more model we compose an article about Student of the Year. We can undoubtedly know whether it's a film or student understudy yet the internet searcher doesn't have such knowledge. So we have to give some extra data to web crawlers about a site page as organized information.


How to add structured data?



A schema.org is the vocabulary which is used in three various formats to add structured data in a webpage. By providing structured data to search engines you are helping search engines to understand what your page is all about. If you did it right search engine will surely return you a favor by generating rich results for your webpage in SERP’s.

A rich result or rich snippets is an extra piece of information in a styled manner that appears in search results for the webpages only, which have included structured data but not for all search results.

A view of rich snippets in search result.
rich snippets example in google search results


We use http://schema.org vocabulary along with any of these three formats to generate structured data for a webpages.

  1. Microdata
  2. RDFa
  3. JSON-LD


Among all these formats JSON-LD is the preferred format of defining structured data according to Google since 2015.

Here I will give you one or two examples of How to add Structured data to LocalBusiness website websites in json-ld format.

<script type="application/ld+json">

Everything you write to add structured data will be within this <script></script> tag.


In the second line,
 "@context" : "https://schema.org" 

Here you are telling the search engines that I am referencing schema.org vocabulary.


In next line add an item type, in this case it is LocalBusiness.
"@type" : "LocalBusiness" 


After you have added ItemType, next add some ItemProperty and value like this, "ItemProperty" : "value" ,
"name": "Business Name",
"image": "url of the image of the business",
"@id": "domain of the business: http://example.com/",  
"url": "url of the sub branch of your business if any or same as @type",
"telephone": "",

The "name" property mark up the name of the business, "image" property mark up a suitable image for your business which you want to show up in search results. "@id" property signifies the purchased domain of the business and "url" property mark the url of the branch if your business does have. Basically "@id" property does not change it remains the same for all the branches only "url" property will change from branch to branch. Similarly "telephone" is also a property whose value you need to provide.

Next, We will talk about nested ItemType. In the "address" property field, there is one extra ItemType which defines the type of the address. In this case, it is "PostalAddress".

"address": {
"@type": "PostalAddress",
"streetAddress": "",
"addressLocality": "",
"postalCode": "",
"addressCountry": ""
  } 
         


So, If we add all the above codes together, whole script will look like as below.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "LocalBusiness",
  "name": "name of the business",
  "image": "url of the image of your business",
  "@id": "domain of the business: http://example.com/",  
  "url": "url of the sub branch",
  "telephone": "",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "",
    "addressLocality": "",
    "postalCode": "",
    "addressCountry": ""
  }  
}
</script>
             


As we can see the above JSON-LD code structures all the data in a webpage. Without well-organized structuring, all data in a webpage is messed up, and the search engine faces difficulty in grasping all the data. We should try to mark up all the data present in a webpage for better results. The more you provide information to search engines about data in your webpage using standardized structured data, the more search engine will understand your page.