Adding schema markup on your website is a great way to help search engines like Google to understand your content more quickly and accurately.
One of the lesser-known ways of utilizing schema markup is by including “entities” within it. Adding entities into schema can help Google better understand the key topics of your content.
In this article, I’ll walk you through a step-by-step process of using entities in schema markup.
Why use entities in schema markup?
So why go through the trouble of adding entities in your schema markup when Google’s natural language processing capabilities (such as BERT and MUM) already help the search engine understand the content of your article?
The answer is that both writers and AI sometimes fail to accurately communicate and identify the meaning, context, and importance of the topics within an article.
Imagine going to your favorite local restaurant and seeing a delicious-looking burrito on the menu, but it doesn’t say what kind it is and what’s in it.
So you order it and when it comes, you have to figure out using your senses to pick up on all the contextual clues of what makes up the dish.
You’ll likely figure out most of the ingredients if you have enough culinary experience, but likely not all of them, especially if it has blended spices!
Using entity schema is like giving Google all the main ingredients for your article, making it inherently easier for them to identify and understand your article’s most important topics without any confusion.
Doing that takes the pressure off of ensuring the words are perfectly used within the article and its sentences to convey their meaning and importance.
Adding entities to your article’s schema
The following process gives me much control and less reliance on third-party plugins. However, if you want to go the plugin route, check out WordLift.
Either way, reading this guide will help you better understand how Google and NLP tools see your most important topics.
Let’s say you have an article titled “The 10 Best Toys for Small Adult Dogs.”
Here are the steps for identifying the most relevant entities for this article and adding them to the schema markup.
Step 1: Analyze your article using TextRazor
Start by copying and pasting your article’s text into the TextRazor demo and clicking the “Analyze” button.
(For this guide, I’m using the article text from DogLab.)
Step 2: Identify relevant entities
On the results page, you’ll see a list of top entities or topics ranked by relevance in the right sidebar.
The higher the score for a topic, the more relevant it is to the article.
The key here is to review this entire list and see how well it’s scoring the relevance of the topics.
If there’s a core topic, such as “frisbee,” and it doesn’t have a high relevance score, then it’s even more important to add this to your schema.
Plus, you may want to consider rewriting sentences containing the word “frisbee” to get a higher salience or relevance score.
For this example, we’ll select the following topics or entities for which you’ll then get their schema data.
Primary entities:
- Dog
- Dog toy
Secondary entities:
- Chihuahua
- Yorkshire Terrier
- Pomeranian
- Shih Tzus
- Pugs
- Frisbee
- Chew toy
- Squeaky toy
- Tennis ball
Not every topic on the sidebar represents a known entity within Wikipedia, Wikidata or Google.
So it’s important to review all the bolded and underlined words within each sentence that’s broken down on the left side of the page.
Get the daily newsletter search marketers rely on.
Step 3: Retrieve entity URLs from TextRazor
Next, locate a sentence on the left side of the results page that contains your first entity.
In this example, let’s choose “dog” as the entity.
Next, click on the Entities tab beneath the sentence that contains the word dog. This will display a list of all the entities within that particular sentence.
We’ll want to copy all the entity URLs for this entity and temporarily store it in a document or spreadsheet.
Right-click on the first entity in the list and copy its Wikipedia link. In this case, it’s:
Then, locate the corresponding Google entity (which should start with “/m/
“) and copy the ID. In this case, it’s (/m/0bt9lr
)
Add the Google entity ID to the end of this Google search URL:
So it looks like:
Go ahead and click on this to verify that the search result page shows results for the query “dog.” Cool, right?
Lastly, find the Wikidata entity (usually starting with the letter Q) and copy its link (e.g., http://wikidata.org/wiki/Q144).
You’ll want to repeat this exact process for each entity on your list. If you find that this is something you want to automate more, TextRazor does have an API you can work with.
Step 4: Incorporate entity URLs into schema
Now that you have collected the Wikipedia, Google, and Wikidata URLs for each entity, you can integrate them into a JSON schema called “about,” which should be nested under the main schema, such as “Article.”
Follow this structure for each entity:
"about": [
{
"@type": "Thing",
"name": "Dog",
"sameAs": "https://google.com/search?&kgmid=/m/0bt9lr"
},
{
"@type": "Thing",
"name": "Dog",
"sameAs": "http://en.wikipedia.org/wiki/Dog"
},
{
"@type": "Thing",
"name": "Dog",
"sameAs": "http://wikidata.org/wiki/Q144"
}
]
If you validate with Schema.org, it should look like this:
Repeat this process for all your entities.
Step 5: Add schema to your WordPress theme
This is where things can get a little more technical and you may need the help of a programmer or try ChatGPT.
Next, we’ll need to add PHP code that will store all of these entities and their schema markup.
The good news is that once you generate the schema for an entity, you won’t have to do it again.
The way I’ve coded it for my WordPress site is to associate a WordPress “tag” to each entity.
For example, I have a WordPress tag called “Dog” and any article about a dog gets this tag assigned to it.
When that happens, the WordPress code automatically shows the dog entity schema.
The cool part is that you can add as many tags as you want to a WordPress post or page, so you can load as many relevant entities as you want to a post with a click of a button.
Here’s a good ChatGPT prompt to start with for generating this code:
If you use a plugin like Yoast SEO, you’ll want to adjust the prompt to incorporate it in their JSON format.
Step 6: Assign tags to your article
Once you’ve got your PHP code in place, you can add tags to your articles.
Head to your WordPress dashboard and ensure that your article (in this case, “Best Toys for Small Adult Dogs”) has the appropriate tags (e.g., “dog”) assigned to it.
The cool part in this example is that once I tag any existing article with “dog,” all those articles will instantly be updated.
Step 7: Rinse and repeat
Repeat this process for any additional entity (e.g., “toy,” “Chihuahua,” “Yorkshire Terrier,” etc.) that you’d like to include in your schema markup.
Incorporating entities in schema markup
Integrating entities into your schema markup isn’t necessary to rank first in organic search. However, it can help you hedge your long-term SEO bets.
Writers and AI aren’t perfect. Writing and interpreting the text on the page isn’t always done perfectly. This means there’s a chance that the relevance and importance of the primary topics of an article could be lessened or missed.
If you’re on the fence about it, test it out to see how it works for your site. Find four articles on your site that are topically related and add at least 5 to 10 entities to each.
You can probably manually edit the schema just for the test articles. If it works well, you can integrate it more deeply into your site’s code or try WordLift.
Contributing authors are invited to create content for Search Engine Land and are chosen for their expertise and contribution to the search community. Our contributors work under the oversight of the editorial staff and contributions are checked for quality and relevance to our readers. The opinions they express are their own.