What is schema?
Schema is a vocabulary maintained and developed by an open community. It’s like a series of flags. You can use different coloured flags to link relationships between ‘entities’ on the web. An entity could be a company, phone number, review or recipe.
Schema is broken down into ‘types’ (here’s the full list of types) and ‘properties’. For example, an ‘organization’ is a type and it has loads of properties e.g. areaServed (the geographic area where a service or item is provided) or email (email address) or foundingDate (the date that the organisation was founded).
You can use these properties to help search engines better understand the information on a website.
How do I use schema?
Why use schema?
You are making the web a better place by helping search engines, and therefore users, understand your content.
It’s not a ranking factor. Adding schema to your pages will not help those pages rank higher.
However, schema can trigger enhanced results in the search engine results pages. These results might look like a list of instructions, or a company’s customer service phone number or star reviews under a search result for a film or a product. For example:
What does the schema code look like?
In the example below, we’ve used JSON-LD to detail business information about TopLine Comms. In yellow we’re explaining to the browser that we’re using JSON-LD. Green indicates it’s the schema vocabulary. Blue is obviously the schema type we’re referencing and the pink indicates all the different schema properties.
You will notice in the example above that we had to specify the type of address we were using, and we ‘nested’ some of the properties under PostalAddress (as indicated by the slight indentation).
TIP: if you use Google’s Rich Results Test tool to check your code before you add it to your site (and you should), bear in mind you’re playing by Google’s rules. For example, in the above, the value expected for contactType is text. So as long as you’re describing what the phone number can be used for you could write anything e.g.
“contactType”: “Dog grooming helpdesk”
This would not be incorrect, but Google would say it is when you run the code through the structured data testing tool. This is because Google expects you to pick one of its approved contact types. Here’s a list of approved contact types. Always good to check Google’s documentation when drafting your JSON-LD.
How do you create it?
So, first of all, you don’t need to be able to ‘code’. There are two easy ways to create it:
- There are loads of free tools out there that will auto-generate the schema you want to create. Simply search for ‘schema generator’, pick your tool, and away you go! Once you’ve created it and tested it you’ll need to give it to whoever manages your website and explain which page/s you want it adding to.
- Use a CMS plugin. The most popular and best example is Yoast SEO for WordPress (£89 at the time of writing – a bargain at twice the price in my opinion!). The team at Yoast is constantly releasing new versions of the plugin that support more and more schema implementation. Well worth the investment if you’re running a WordPress site. Enables you to log in to your CMS and add the desired schema directly to the page without worrying about having to write it yourself.
Before you get started, a few things to bear in mind:
- Google only supports and displays rich snippets for a limited number of schema types. You can find them here: https://developers.google.com/search/docs/guides/search-gallery. New types of schema are being supported all the time though, so you can never mark up too much! At worst you’re improving the internet for everyone, at best you’ll start generating new rich results without even realising it!
- The free tools are limited – normally they’ll support a few of the more popular schema types e.g. local business, product, person etc. If you can’t find what you need then simply search online for the schema you want and then hack it around a bit – change the values to suit your purposes and then use the Rich Results Test tool to weed out any errors
- If you’re really stuck then Google actually has a tool called Data Highlighter which is in the old version of Search Console. You can use it to easily mark-up data on your site. However, with old Search Console almost entirely replaced by new Search Console, you may find it’s a tool that’s not supported for long
Dos and don’ts…
- Use JSON-LD and add to <head> section of the webpage
- Specify all required properties for your rich result type (otherwise you won’t be eligible for enhanced visibility in the search results)
- Add as many recommended properties as possible (and the rest…for tomorrow’s SERPs e.g. authorship…)
- Add structured data to every duplicate page not just the canonical version
- Use specific applicable type and property names
- Make sure marked up images belong to what you say they belong to
- Mark up content that is not visible to readers of the page
- Mark up irrelevant or misleading content
- Use structured data to deceive or mislead users
- Mark up content that promotes illegal activities
- Home of schema: https://schema.org/
- A more detailed beginner’s guide to schema: https://yoast.com/structured-data-schema-ultimate-guide/
- JSON-LD beginner’s guide – very good resource if you’re keen to learn a bit more about the format and troubleshoot your own code: https://moz.com/blog/json-ld-for-beginners
- Google’s testing tool – it’ll point out errors that you’ll want to fix before adding the code to your site. It’ll also enable you to check URLs that contain schema to make sure they’re hunky dory: https://search.google.com/test/rich-results
- Google’s currently supported (i.e. results in rich snippets) structured data types: https://developers.google.com/search/docs/guides/search-gallery
- One of the many free schema generators out there: https://www.jamesdflynn.com/json-ld-schema-generator/
If you’re stuck with schema then contact us today to find out more about our SEO services.
This blog was originally published in July 2019 and has been updated for accuracy.