Whether you own a website or you are promoting someone else’s website, you want the website to have good rankings on search engines. You probably also know that in order to achieve good rankings, it is imperative for you to make sure that search engines understand what your website is about. HTML is a markup language which is used to give structure to a web page. You can markup content on your page to let the web browsers or search engine crawlers know which portion is a paragraph, which is a heading, which is a list, and so on. However, such a markup does not provide further meaning to the content and search engines cannot understand what the page is about. The solution lies in implementing structured data which is discussed in the remainder of this article.

(For the purpose of this discussion, I will use the term "Google" to mean all search engines in general and describe the best practices for implementing structured data on your website for Google. Such practices hold true for all other search engines as well.)

What is Structured Data?

Structured data is a standardized format for providing information about a web page to search engines. It is a mechanism used to classify the page content. For example, if the page is about a mobile phone, we can tell Google what is its screen size, what is the capacity of its battery, etc. by marking up portions of the page using a special vocabulary. Most search engines rely on the schema.org vocabulary. You can create structured data for a web page using this vocabulary in one of the following formats:
  1. JSON-LD (JSON for Linking Data)
  2. Microdata
  3. RDFa (Resource Description Framework in Attributes)

Since Google recommends using the JSON-LD format for implementing structured data, I will only discuss this method in this article.

Example of Structured Data

Suppose you have an e-commerce website which deals in mobile phones. Regardless of which platform your website is built on, you will, in all probability, have a product page to show the details of a mobile phone. The HTML code for this page would be dependent on your platform – it might be a static file or be generated dynamically by pulling out information from a database. Most of this HTML would be for displaying the details of a particular mobile phone being viewed. Additionally, you need to have a piece of code containing the structured data. This code would be meant only for search engines. An example of such code is shown below:


{
    "@context": "http://schema.org",
    "@type": "Product",
    "name": "iPhone 8",
    "description": "It is a great phone with an exceptional camera.",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingCount": "55",
        "ratingValue": "4.2"
    }
}

The above code snippet describes a type "Product" using properties like "name", "description" and "aggregateRating". You can find the complete list of properties supported by the schema.org vocabulary for the type "Product" at this URL: http://schema.org/Product. The code for implementing structured data can be easily tested using the free Structured Data Testing Tool by Google.

Importance of Implementing Structured Data

If implemented properly, the information contained in structured data qualifies to appear in rich snippets. Rich snippets are a way to improve the appearance of your search listings. The following snapshot shows the stars that are displayed using a code similar to the one shown above:

The presence of rich snippets draws human attention resulting in higher click-through rates. I hope this simple example is more than enough to motivate you to implement structured data on your website. There are some important things that you need to keep in mind while implementing structured data which are listed below:

  • Google does not guarantee that your structured data will show up as rich snippets in search results, even if you have implemented structured data correctly.
  • You should not create empty pages that just contain structured data.
  • You should not add structured data about information that is not visible to the user, even if the information is accurate.
You can read the general guidelines for implementing structured data on your website at https://developers.google.com/search/docs/guides/sd-policies.