Structured Data and SEO

Osamu Morozumi, 12th April 2020
Colorful infographic depicting enriched search results

Structured data is an important aspect of technical SEO and shouldn’t be overlooked. It may seem complicated but there are various tools and documentation to developers and SEO specialists to include it in their arsenal or tools. You will not only visually enhance your SEO page results but get a boost in page rankings.

What is structured data?

Structured data is information organized into a standardized format which helps search engines to crawl, organise and display content. It is often referred to as Schema markup as this is the most used ‘vocabulary’ of structured data by Search Engine Optimization professionals.

There are three main types of structured data used for SEO:

  • JSON-LD
  • Microdata
  • RDFa

Google recommends using JSON-LD so this is what I would recommend using too.

JSON-LD

JSON-LD is embedded into markup with script tags. It doesn’t render on the web page itself but is visible to search bots. Any structured data including JSON-LD should always relate directly to content in the page. Google penalizes empty web pages which only include structured data. Below is an example of how JSON-LD is written. This snippet contains contact information for a company and is taken directly from the Google guide on structured data. It can be included in the head or body of the HTML.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "url": "http://www.example.com",
  "name": "Unlimited Ball Bearings Corp.",
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+1-401-555-1212",
    "contactType": "Customer service"
  }
}
</script>

If you’ve ever written JSON or JavaScript you’ll be familiar with the syntax used. It basically consists of double quoted strings organised into key-value pairs. These are encapsulated by a pair of curly brackets. Notice how the “contactPoint” key has more key-value pairs in curly brackets as its value? This is called nesting and is common in JSON. If this all looks a bit technical don’t worry as there are visual tools to add structured data without writing a single line of code.

How Does Using Structured Data help SEO?

Adding structured data helps search engines to determine what a web page or website is all about. By making it easier for bots to crawl your website you’ll be rewarded with an SEO boost! Structured data can enrich the way your webpage appears in search results with visual enhancements like images, knowledge graphs, interactive features and carousels. For example if you do a google search (in desktop or laptop) for chicken soup you should see a carousel of recipe cards appear.

This carousel generated from JDON-LD structured data displays rich content in search results.
This carousel generated from JDON-LD structured data displays rich content in search results.

For each card in the carousel there is an image, title, rating, the name of the website it comes from, cooking time and the first line of ingredients. All this in a small, well presented card. This also appears at the top of the first page of search results. So not only is the format visually appealing and informative, each of these recipes are given priority on the results page due to structured data.

How can I use structured data?

To include structured data in your website there are three main ways:

  1. By using plugins
  2. Using Google’s structured data markup helper
  3. Hand coding

Plugins

If you’re using CMS for your website there’s probably a plugin available to include structured data in your markup. This is the easiest way to add structured data or schema markup to your website. WordPress developers can use the Schema App Structured Data plugin to automatically generate schema markup for their websites. Plugins are also available for other popular Content Management Systems including:

Google structured data helper

Google has a handy visual tool for generating structured data. This is a good option if you are developing a hand coded website without the aid of a CMS. Simply type in the URL of your website, or paste in the markup of your webpage and use the available data type options to markup up the appropriate sections of each page. The tool will render the web page for you so you can select each element visually. Then press the “create html” button and select the syntax you want it to generate from the drop down box. I recommend using JSON-LD rather than Microdata.

Hand coding structured data

This last option will be more difficult to implement as there is quite a lot to learn. However it also offers the most flexibility and power. Be sure to follow the general guidelines for structured data set out by Google and refer to Shema.org for detailed documentation. Google also has a great reference for coding schema markup.

Further reading

References