How to Use Schema for Local SEO: A Complete Guide

For the past few years, schema has gained a following among SEO professionals as a legitimate optimization strategy to gain the all-important answer boxes and rich snippets in position zero of the search results.

At its core, schema is a foundation for markup data that allows search engines to better understand location-based structured information like addresses, dates of events, phone numbers, and other information.

This foundation is then used in rich snippets, video carousels, and the like, and also displayed in neat card-like arrangements in an attempt to make search results more appealing to the user experience.

That being said, let’s dive right in and begin our work with learning about schema markup and how it can be applied to local SEO.

What Is Schema Markup?

Schema markup was created by Google, Bing, and Yahoo.

The goal of schema was to create and provide support for a common group of tags that could be used by the search engines to better understand and display data.

This markup is used by many local brick and mortar shops in SEO to help appear in the SERPs for answer boxes, carousels, and other rich snippets that can be generated by this markup.

Who Can Benefit From Schema Markup?

In theory, just about any business can benefit from Schema markup to gain traction and a competitive edge in the SERPs.

In local SEO, schema markup generates SERP display data that is specific to certain businesses that appear as entities across the SERPs.

Businesses like attorneys, doctors, restaurants, electronic repair shops, small eateries, sandwich shops, electronic sales locations, and more use schema markup to help generate rich snippets for their businesses.

What Are Google’s Guidelines on Schema Structured Data?

Let’s shift gears just a little bit here.

Instead of providing a word-for-word assessment of Google’s guidelines for structured data, I wanted to provide my own interpretation of their guidelines based on my own previous experience and give you some overall tips you can use to avoid any issues that may arise with violating Google’s guidelines in the future.

As we are all well aware, Google has plenty of guidelines to restrict spammy schema markup and make sure that the spam does not show up in the SERPs.

It should be noted that schema structured data should not be spammy in any way, and should always accurately reflect what the page is about.

If you use spammy schema structured data en masse, then you can expect to eventually be penalized by Google at some point for spammy use of this data.

Google’s main goal is for its search results to be spam-free. Does this work in the real world? Not always.

And, as we all know, it’s not as simple as simply policing the web for spam. That would be impossible with millions of queries being searched per day.

To avoid the situation where your markup is considered spammy, Google recommends that you make sure it meets their own structured data guidelines and that you don’t brute-force pound their results with spam.

One of the best tips I can give you is: to make sure that your schema markup meets Google’s guidelines, always ensure that your markup aligns with the user intent of the page.

This means that a close match of user intent should be taking place with all implementation of Schema markup for that page.

Don’t markup a page intended for a sporting event with markup that is intended for a restaurant. While that is a more “out there” example, it can happen. I just wanted to provide a clear example so as to clear up any confusion that may arise.

Google stresses not to create any schema markup that makes content invisible to any user who may be consuming that content. It should be the same as the markup being used for that purpose.

You should also not be using markup that is either “irrelevant or misleading,” per their guidelines. If your local page serves attorneys, don’t use schema markup to mark up data intended for doctors, and vice versa.

Google also specifies in their guidelines that your schema markup should be complete in order to fall within their parameters for inclusion. This means that if the markup calls for an image, or other specific pieces of information, do not neglect to include it.

What Formats of Schema Markup Are Available?

There are three:

Standard schema microdata, marked up via HTML, is the most common, and the easiest to learn how to implement. Throughout this guide, I will be referring to it as schema markup.

Setting up Your Code Structure

With schema markup, it is necessary to first plan out your structure so that it complies with Google’s guidelines. Then, these steps:

Look up your needed schema data type on the schema.org website.

Get the local information for the page you wish to include schema markup on and gather up all the code you wish to use.

Code your schema entities.

Test your code via Google’s Structured Data Testing tool.

Crawl and test your schema markup in Google’s Search Console.

Monitor results of this implementation on an ongoing basis with entity results reporting.

Rinse, and repeat.

The Basics of Coding With Schema Markup

Coding schema markup may sound like an insurmountable, complex task to the uninitiated, but it really is simple once you learn how to do it.

We are discussing on-page standard schema markup in this particular section, although we will go over other variations of this markup as well.

So, let’s get started.

First, a few points – it does not matter structurally whether you use a span or a div. Either one can be used as long as a parent declaration for the entity is used, and you pay attention strictly to your opening and closing tags, along with nesting of your code.

Here’s an example, which you may have seen before:

<span itemscope itemtype="https://schema.org/name-of-data-type"><span itemprop="name">Name of data type, like company name</span><span itemprop="name">Name of data type, like company address</span><span itemprop="name">Name of data type, like company city</span><span itemprop="name">Name of data type, like company state</span><span itemprop="name">Name of data type, like company zip code</span><span itemprop="name">Name of data type, like company phone number</span><span itemprop="url"><a href="domainname.com">Company website</span></span>

Here is an example of the same code using a span tag instead. Both versions validate 100% in Google’s structured data testing tool.

Remember, the only thing you need to be concerned about when it comes to either implementation is making sure it has a parent declaration tag (declaring the schema itemscope and itemtype, respectively).

As long as you have that basic structure for both implementations of schema markup, you will be golden.

Google’s Structured Data Testing Tool says both of these snippets of code validate. If there are any issues with using span itemscope itemtype as opposed to div itemscope itemtype, I haven’t run into any.

This is important to note, especially if your CMS is custom coded and has issues with standard schema markup. If that’s the case, then using span may be your only option to include schema.

What is important is making sure that the parent declaration of the schema data type is present, and that the group of tags is properly nested, opened, and closed. And that they validate 100 percent.

I should note that with this coding example, the name-of-data-type in the first line does not exist in the schema vocabulary and will not be validated in the tool.

JSON-LD: A Comprehensive Schema Markup Protocol Rooted in JavaScript

JSON-LD (JavaScript Object Notation for Linked Data), is an application of schema markup applied in a JavaScript format.

It is more desirable and less complex than schema microdata to implement.

Why? Because you can just add JSON-LD code to a document via ctrl-V + ctrl C, rather than needing to wrap special tags around HTML elements in order to create the coding.

The advantage of this approach: you can move forward with some schema markup optimizations faster than you would otherwise.

A schema markup optimization using JSON-LD is much faster to copy and paste than going through tedious individual tags of HTML markup.

The Basics of Coding with JSON-LD

JSON-LD markup is versatile, simple, and easy to code.

First, you should be familiar with your business’ specific item data types in the schema vocabulary.

It is easier than schema markup because JSON-LD does not require any code to be wrapped around tags in the body of the page content. You simply include JSON-LD code within the header of the page.

Next, let’s walk through some of the syntax structure involved in JSON-LD.

This comes to one more point. If you are testing your code in Google’s Structured Data Testing tool, you are copying and pasting from other programs, and you know your code is right, but it is throwing errors, try typing it in the tool line by line.

Your code may be just right, but the quotes from other programs are what are throwing those errors.

Proper Itemtype / Schema Vocabulary

If all other issues are correct, and your schema markup still presents errors, you may not have included all requirements for the Itemtype as presented in the schema vocabulary.

It is a good idea to do a thorough analysis of your code vs. the required item types in the schema vocabulary just to make sure that your code matches up with all requirements needed for the code to pass.

Any Violations of Google’s Guidelines or Policies

Even Google guidelines and policies violations can cause issues. Do a review of the guidelines from Google just to make sure that you haven’t violated any major (or minor) policies that are usually set forth in these guidelines.

Examples of Schema Markup for Local SEO to Get You Started

Let’s go through some examples of schema markup for you, with specifics on which local SEO situations they will be helpful for.

These implementations of schema markup templates and their examples will be helpful for including schema markup for the most common local SEO businesses.

Reviews Schema Example

<div itemscope itemtype="https://schema.org/Reviews"><span itemprop="itemReviewed">Personal Injury Law Service</span><span itemprop="reviewAspect">This review or rating is relevant to services provided by this law firm.</span><span itemprop="reviewBody">"We thought these attorneys were amazing."</span><span itemprop="reviewRating">5</span></div>

Here is an example of Reviews Schema generated in the SERPs:

Rating Schema Example

When you use rating Schema, it is possible to see the star ratings and reviews entries in the SERPs as a result.

Where to find the Rating Schema Vocabulary: https://schema.org/Ratings<div itemscope itemtype="https://schema.org/Review"><span itemprop="itemReviewed">Personal Injury Law Service</span><span itemprop="reviewAspect">This review or rating is relevant to services provided by this law firm.</span><span itemprop="reviewBody">"We thought these attorneys were amazing."</span><span itemprop="author">John</span><span itemprop="reviewRating" itemscope itemtype="https://schema.org/Rating"><meta itemprop="worstRating" content = "1"><span itemprop="ratingValue">1</span>/<span itemprop="bestRating">5</span> stars</span></div>Here’s an example of Ratings Schema being generated in the SERPs: