Why Remote Procedure Calls (RPC) Are Better than REST
Ever wondered why some search results on Google have extra bits of information like pricing, ratings, and other pieces of information. This is implemented by adding Structured Data to your website. Let's look at some sites that have implemented Structured Data.
This information is often picked up by crawlers like Google or Bing by crawling the site and reading metadata in the form of Structured Data.
So what is Structured Data? Structured data is a collection of data that is formally organized. This collection of data makes it easier for search engines to crawl and contextualize your content. Let's look at a real life example of defining an AudioBook. Many AudioBooks have these common traits: published date, author, price, and publication date. Without a formal schema, two people could represent the same AudioBook differently.
Title | Price | Published Date | Author |
---|---|---|---|
Animal Farm | $19.99 | June 8, 1949 | George Orwell |
Name | Cost | Release Date | By |
---|---|---|---|
Animal Farm | $19.99 | June 8, 1949 | George Orwell |
You can see that both of these represent the same thing, but are organized in differently. So what can we do to systematically organize them the same way? Well that's where Structure Data comes in. Structured Data allows developers to organize metadata in the same fashion making it easier for search engines to parse metadata and understand the context of your site.
You can add Structured Data to your site with one of the following formats:
Google recommends JSON-LD so we'll be using that for the rest of the blog.
To add JSON-LD to your site, you'll add a script tag with type="application/ld+json"
. Inside the script tag you'll put a blob of JSON. I snatched the following snippet from jsonld.com which has great examples of JSON-LD.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebPage",
"breadcrumb": "Books > Marketing > JSON",
"mainEntity":{
"@type": "Book",
"author": "http://www.example.com/author.html",
"bookFormat": "http://schema.org/EBook",
"datePublished": "2015-05-01",
"image": "coverImage.jpg",
"inLanguage": "English",
"isbn": "00000000",
"name": "The Title of Book",
"numberOfPages": "1234",
"offers": {
"@type": "Offer",
"availability": "http://schema.org/InStock",
"price": "9.99",
"priceCurrency": "USD"
},
"publisher": "O'Json Publishing",
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4",
"reviewCount": "12"
}
}
}
</script>
If you're unsure of which schema to use, you can reference schema.org and search for a keyword. For example, if you have a page about Pho recipes, you can type in "recipe" into the search bar and it'll pull up the schema. I would also recommend looking at jsonld.com or Google Search's Documentation for good references.
You can validate your structured data by running your site through this tool. It will tell you if your Structured Data is implemented incorrectly.
Currently Google has implemented a subset of items. Some common items include:
You can find a full listing here.
Also, Google's search engine is a blackbox. Just because you implemented it correctly doesn't mean it will show up at all since Google has algorithms that determines if the content is good enough.
While Structured Data is not a ranking signal, if correctly implemented, you'll see an improvement in SEO rankings. Structured data helps search engines understand the content of the page and therefore serve the page for more relevant for search queries. Search results with enriched snippets give more visual appearl which can boost the click through rate. This in turn will lead to more visitors for your site!
Hopefully you learned something new about Structured Data! What other things have you done to optimize your site? Leave a comment in the comments section below!