What is Schema Markup?
Schema markup, also known as structured data, is code on a webpage that provides search engines with more information and context about what your page is about.
The schema markup language was created by the major search engines (Google, Bing, Yahoo! and Yandex) back in 2011, and continues to grow to this day. The official website of schema markup is http://schema.org/ and includes tutorials, examples, and a library of the various schema markup types.
Why do search engines use schema markup? It’s because search engines can’t understand context as well as a human can, and thus without the schema markup providing that context, they might not be able to understand your web page’s subject.
For example, let’s say you wrote a blog post reviewing the movie ‘Avatar’, While a human reading your blog post will understand almost immediately what your post is about, a search engines might now. In their eyes, they might not know if you’re referring to the movie ‘Avatar’ by James Cameron, or the TV show ‘Avatar: The Last Airbender’, or perhaps the Hindu concept of an avatar.
By marking up your review with Movie schema, when search engines crawl your page, they’ll know for sure that this page is indeed referring to the movie ‘Avatar’. You can see an example of Movie schema I created for Avatar below:
Does Schema Markup Help with SEO? Should I Use it?
You’re probably wondering if using schema markup helps your SEO efforts.
In short, yes, using schema markup will help your SEO.
Schema markup helps search engines better understand your content, and in many cases enables your web page to visually stand out in the SERPs (Search Engine Results Page). However, the answer is a bit more complicated than that.
To really answer this question properly, we need to discuss the different types of schema markups and their effects on SEO.
The Major Schema Markup types
On schema.org, you can find literally hundreds of different types of schema. In this guide, I’ll cover the essential schema markup types the majority of websites might use:
Seriously though, there are a lot of different schema types out there. It’s worth poking around schema.org to see if there’s a schema type relevant to your website. I also have a dedicated guide to HowTo schema here.
Organization schema provides search engines with more information about the organization behind the website. You can specify your organization’s name, phone number, address, social media profiles, and much more.
I recommend that every business use organization schema because it can help Google in particular provide correct information in your company’s Knowledge Graph. While organization schema isn’t the only data source, it is a particularly trustworthy source since it’s coming directly from your website.
Product schema is a must-have for any ecommerce website. With it, you can specify your product’s name, image, price, star ratings (out of 5), and more.
And the best part is, if you follow’s Google’s guidelines your product page will be eligible to show up as a rich result in Google search. That gives you an advantage in the SERPs that can improve your clickthrough-rate, and therefore, your SEO. See below for an example of a rich product result in Google:
As you can see, the Best Buy result stands out much more than the top result from nintendo.com. It contains loads of information at a glance.
The required properties for product schema in Google are:
- Price Currency
But they also recommend including the following:
- Image (required for Image Search)
- aggregateRating (review stars)
- Item Offered
While aggregateRating isn’t technically required, I highly recommend including it. When it comes to Product schema, it is how you can get review stars in the SERPs. Having those review stars is key to improving your clickthrough-rate and driving more traffic and sales.
For more information on Google’s requirements and recommendations for Product schema, check out their documentation here.
Local Business Schema
Local business schema is an essential schema markup type for any sort of local business. It provides search engines with similar information to organization schema, like address and phone number, but can also specify things like business hours and reservations for restaurants.
There are a number of required properties for local business schema. Please see the list below from Google’s documentation:
- Region (state or province, if applicable)
- Postal or zip code
- Street Address
For restaurants, providing an image is also requirement.
There’s plenty of recommended properties as well, and I would particularly recommend specifying your business hours in your schema.
Blog and Article Schema
The last major type of schema I’m covering in this guide is BlogPosting and Article schema. You’ll use this schema to give search engines the essential information about the news article or blog post you’ve written, such as the author and published date.
These schema types are very similar to one another, the main difference being the @type attribute you specify in the code (NewsArticle or BlogPosting). If that doesn’t mean anything to you, just look at the code samples below:
The main reason to use BlogPosting and Article schema is that in Google, your content is eligible for enhanced features in the SERPs. If you have an AMP page, this markup lets your page be eligible for the a carousel of rich results on mobile.
If you don’t have an AMP page, the structured data can still allow your article to show up in the SERPs with a prominent headline and image. Truthfully though, most mobile carousels these days feature AMP exclusively, so if you are major topical content producer like a news or sports site, you’ll want to configure your site for AMP. You can check out my starter guide to AMP, here.
As for what properties are required for these schema types, see the list below:
- Author name
- Date Published
- Publisher Name
- Publisher Logo
- Publisher Logo Height
- Publisher Logo Width
- Publisher Logo URL
For more information on Google’s requirements, including recommended properties, check out their documentation here.
Schema Markup Formats
Google officially recommends using JSON as your schema language of choice. Their reasoning is as follows:
While you can use the other formats, the rest of this guide will cover JSON schema creation and implementation. If for whatever reason JSON simply isn’t an option, I recommend reading schema.org’s guides on Microdata here.
A (very) Brief Guide to JSON
Fully explaining JSON could be it’s own huge guide, but I think it makes sense to at least give you a rundown of the basics of what JSON is and how it works.
JSON is built on two structures:
- A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
- An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.
As an example, in the Movie schema above, one of our name/value pairs is dateCreated/2009-12-10. The information under the actor property is an array.
If you’re interested in learning more, check out https://www.json.org/
How to Create Schema Markup
Creating schema markup might look intimidating if you’ve never done it before, but truthfully, it’s not all that hard. There are a number of tools out there that allow you to generate schema code without any knowledge of JSON.
The first place to visit is schema.org. For most schema types, the website provides example codes for all 3 major formats, which you can use as the base of your own code.
As an example, if we go to the Movie schema page, we can scroll down to the bottom, copy the JSON example for ‘Pirates of the Carribean: On Stranger Tides’, and then modify the values in the name/value pairs to refer to our own movie page. Indeed, that’s exactly what I did to create my Avatar movie markup in the beginning of the guide!
The second place to visit is Google’s Developer Guides, where they have awesome, comprehensive guides to some of the major schema types websites can use to enhance their SERP presence. These guides explain what the schema type is, why SERP features you are eligible for when using them, required and recommended properties and live code examples.
The last place to visit is a schema markup generator. There are a lot of great, free tools out there, but I personally like the schema generator from Technical SEO. All you have to do is select your Schema markup type, fill in your information in the fields, and then copy and paste the compiled code. It’s very easy to use, it’s free, and it doesn’t even require a login or submitting your email.
How to Test Your Schema Markup
Before you implement your schema markup, it’s important to test it. If there are any errors your webpage won’t be eligible for rich results. And if Google thinks you’re being spammy with your schema implementation, you could actually get a schema markup penalty.
Luckily, it’s very easy to validate your schema markup. The main way to check schema code is to use Google’s Structured Data Testing Tool. This tool is awesome because it allows you to paste your schema code directly into a text field, and then the tool will analyze the code and alert you to any errors or warnings.
There’s also an option to validate schema that’s already live on a page by selecting the Fetch URL option.
Pro tip: Use this capability to run competitor websites through the tool and see what schema types they are using. They might be using something you haven’t thought of that might be worth stealing!
The other main way of validating schema markup that’s already been implemented it to use the Structured Data report within Google Search Console (formerly known as Webmaster Tools).
This report is great because it saves you the hassle of having to spot check pages on your website; this report gives you a holistic look at the site and directly points out any pages with errors. You can then click on the affected page, test the live data in the Structured Data Testing Tool, make your corrections, and then re-implement on the site. I recommend making it a habit to check this report on a weekly basis.
How to Implement Schema Markup
There are a number of ways to implement structured data on your website. I’ll be covering the following methods:
- Source Code/FTP
- WordPress Plugins
- Magento Extensions
- Google Tag Manager
Source Code / FTP
The most common way of adding schema to your website is to just edit your page’s source code and manually insert the code there.
Many people ask the question ‘where do you add schema markup on your page’? For JSON, you can technically add it anywhere on the page. Inserting it either in the <head> or <body> tags will work just fine. And on WordPress, you can literally just paste the code into the WYSIWYG (text editor).
There are several WordPress plugins you can use to implement schema markup. The most popular ones out there are:
- WP Review for review/aggregateRating schema. This will help you get your pages marked up with stars in the SERPs.
- All in One Schema.org Rich Snippets for 8 schema types;
- Software Application
- Local SEO for WordPress from Yoast is for LocalBusiness schema.
With that said, I don’t recommend using plugins. All of them are limited in some ways, and you often need the premium version of the plugin to really unlock their value. It’s worth it to just implement the schema yourself.
Magento Extensions (MAGEWORX)
If you’re running a Magento site, if you aren’t implementing the schema directly I highly recommend using the Mageworx SEO Suite Ultimate extension. It’s useful for a ton of SEO functions, but it also is the easiest way of implementing schema markup on your Magento site.
Right out of the box this extension supports Product and Organization schema. All you have to do is tweak some settings and you’re good to go!
Google Tag Manager
Implementing schema markup through Google Tag Manager is my preferred method. I won’t go into too much detail here, but essentially you can create custom HTML tags that contain your JSON code, and setup triggers that fire that schema on your desired pages.
You can even take this a step further by creating custom variables that dynamically pull in HTML elements from your website and build that into your JSON markup. That way, you can dynamically create schema markup on sets of pages, such as Product schema for product pages or BlogPosting schema for blog posts.
If you’re interested in learning more, I highly recommend checking out this guide; it’s what I used to learn the method myself!