Structured Data for Leveling-up the SEO of Your Website

Khachatur Tovmassian
SFL Newsroom
Published in
6 min readJun 10, 2019

When building a website, we should make sure that other people can find it through search engines like Google, Yandex, etc. For that reason, we should take care of our website’s SEO (Search Engine Optimization) and make search engine crawlers fetch the data related to the website and index in their databases so that whenever people are searching for something which matches our website content the website will appear in the search results.

When googling something, we usually expect to see a title, URL, and a description (Fig. 1). This information is usually being fetched by crawlers from <meta> tags in the web page's HTML markup containing a title, a description, etc.

Figure 1. Traditional Google search results with titles, URLs, and descriptions.

That’s nice, but the title, the URL, and the description are sometimes not enough, and in many cases, we would like to share more information with search engines. Let’s try something else by googling, “buy a Sony smartphone.” Looking into the results (search results can be different based on the region) and scrolling a little bit down we will see a nice carousel containing a list of beautiful Sony Xperia mobile phones (Fig. 2).

Figure 2. Google search results with a list of products marked up with a carousel layout.

So Googlebot somehow understood from our search keywords what are we looking for and brought up for us a list of phones with their prices, ratings, etc. It’s quite interesting, isn’t it? If we click on one of the items, Google will redirect us to a new page with search results, matching the name of the phone that we have clicked on. Let’s click on the first result: Xperia 1 — Official website — Sony Mobile and open the browser development tool (if you are using Google Chrome then for Windows the keyword is F12, on macOS it is ⌘+shift+C). There, in the Elements section, we can see the HTML markup of the website. If we search there (Ctrl+F or ⌘+F) “ld+json” we will find several <script> elements with type=”application/ld+json” attribute (Fig. 3). The object bundled within those tags is actually called structured data.

Figure 3. Structured Data in HTML markup.

What is structured data and where it comes from?

Structured data had been developed by schema.org — a community aimed to create, maintain, and promote schemas for structured data in the World Wide Web. It is founded by major search engines such as Google, Microsoft, Yahoo, and Yandex. And these major players are developing special Schema.org vocabulary which can be injected into the website markup.

“Structured data is on-page markup, which helps search engines better understand and analyze the information on a specific website, and then use this information to improve the website’s SEO.”

Structured data can have different formats, such as JSON-LD (JSON Linked Data), Microdata, and RDFa. So far it is being used by over 10 million websites, and this number is continuously growing.

Let’s look into that structured data in more detail (Fig. 4). This data is an object with different properties such as “manufacturer,” “name,” ”colors,” “weight,” “additionalProperty” with a list of phone specifications and much more. With the help of that structured data, search engines can crawl and index a very wide range of information related to a website and use that data to show it in a more user-friendly way in search results.

On the same webpage, there is no limit of structured data bundled with multiple script tags, but it is very important to set specific and precise information in order to help web crawlers use it more wisely while indexing webpage information. One of the key properties that structured data should have is “@type.” In the page where we checked the HTML markup, there are two types of defined structured data — “Organization” and “Product.” The Organization-related data contains general information about Sony Mobile while the Product-related data contains everything that describes the specific product, in this case — the Xperia 1 mobile phone. The next question that comes up usually is — how we can know whether our structured data is structured correctly. Here is the answer…

Testing the structured data

Thanks to Google, it is possible to test the structured data with a tool called Structured Data Testing Tool — Google. In order to test, we can either put a webpage URL or a code snippet of structured data. Let’s go with the URL option by testing the Xperia 1 webpage and seeing how well it is structured (Fig. 5).

Figure 5. Structured Data test results for Xperia 1 page.

On the right side, we can see three fields. Let’s first check the field which has only warnings — the Product-related structured data. There are three items with the type Product. The first two are in Microdata format mentioned earlier as one of the formats of structured data defined by Schema.org. The third product-related structured data has only 3 warnings and is in JSON-LD format (Fig. 6).

Figure 6. Warnings in structured data.

You should always remember that warnings are not errors. They are just recommendations by Google aimed to improve your data crawling. In this example, it suggests adding “description” in your data as well as “sku.” If you are not using “sku” as your product identifier, it is obvious that the value will be missing. With warnings, your data will still be crawled, but it is suggested to fix them if that is possible.

Now let’s look into the fields that contain errors. There are 2 items with “Unspecified type,” and both have 3 errors. Let’s check those errors (Fig. 7).

Figure 7. Errors in structured data.

From the value of the second property, we see that this structured data is related to one of the suggested accessories — “Style Cover Touch SCTI30 for Xperia 1” that can be found on the bottom of the page. All the found errors here are related to “aggregateRating” and by looking into their descriptions, we see that either there are no reviews for that item, or the rating data is not fetched correctly from the back-end.

And again, we should always remember that errors are not warnings and they should be fixed. This structured data will not be crawled due to these errors. Besides these errors, it has one more drawback. This structured data has an unspecified type. If it would have the value “Accessories” or something like that, then the item will be more precisely categorized and indexed by SE crawlers but again only if there are no errors in the data.

Concluding remarks

As we saw, structured data is a powerful way to level-up the SEO of a website, but as always — the greater the power — the greater the responsibility. If you decide to include structured data in your website markup, you should structure it very well and test carefully making sure that the search engines crawl it properly.

P.S. This is the first part of my article series related to Structured Data. The second part will tackle more the technical implementation of structured data usage in web applications using Node.js. It will also cover how SEO is being handled for server-side and client-side rendered applications. So stay tuned!

--

--

Khachatur Tovmassian
SFL Newsroom

Lead Software Engineer @EPAM, JavaScript, Angular enthusiast who also enjoys doing yoga, meditation, traveling, techno music, and much more