Structured data and rich results

Explain what structured data does and add a suitable type to a page.

Structured data is a set of labelled facts placed in a page's code so Google can read them directly. Adding it can qualify a page for extra details in search results. Google may still leave those details out, and the markup does nothing to lift the page's ranking.

You have probably seen it at work. A search for a recipe can return results with a star rating, a cooking time and a photo under the link. A search for a concert can show dates and venues. Each of those pages gave Google its facts in a format Google reads easily, and that format is called structured data. Of everything in this module, it is the most technical topic. You won't need to write code for it. You do need a clear idea of its limits, because people often claim it does more than it does.

How labelled facts reach Google

A web page is written for human readers. Google can read it too, but it has to work out for itself which number is the price, which line is the address and which date belongs to the event. Structured data removes that guesswork. It is a block of labelled information added to the page's code that states each fact outright: the type of business, its name, its address, its opening hours.

The labels themselves come from schema.org, a shared vocabulary that the major search engines support. For the format, Google recommends JSON-LD. A JSON-LD block sits on its own in the page's code, apart from the content visitors see, so you can add it and keep it up to date without changing the design.

Take a tuition centre. Its LocalBusiness markup would list the business type, name, address, phone number, opening hours and web address. A visitor to that page can already see every one of those facts.

What markup can and cannot change

With structured data in place, a page becomes eligible for rich results: ratings, prices, dates, images and other extra details that appear alongside some search results. Google also reads the markup to understand the page more precisely.

Being eligible is no promise. Google decides whether to show a rich result based on the search itself, the device being used and other factors. Markup also has no effect on how high a page ranks. If the content on a page is weak, perfect markup leaves it just as weak.

Rich results come from only some structured data types, and Google keeps changing which ones. Over the years some rich result types have been retired, and others are now shown only for certain kinds of site. So before you put time into a type, look it up in Google's search gallery on Search Central. The gallery lists the structured data features Google supports today and the properties each one needs.

Matching a type to your page

A small business usually only needs a few types:

LocalBusiness, or a narrower subtype of it, for a business with a physical location, giving name, address, phone and hours. Product for something you sell, with details such as price and availability. Article for blog posts and news, which can carry the author and the publication date. Event for a workshop, class or performance held on a set date.

Pick whichever type describes what the page really is. Priya runs a tuition centre, and she used LocalBusiness on her homepage because that page covers the centre as a whole. Mei Ling sells cakes. If her site lists them with prices, Product could suit her most popular cakes. A financial adviser holding a public talk might put Event on the registration page. Labelling a blog post as a product, or a homepage as an event, goes against the guidelines and does no one any good.

Keeping markup visible and accurate

Google's structured data guidelines include general rules that cover every type. Small businesses break the visibility rule more often than any other. It says markup may only describe content a visitor can see on the page. Suppose your markup claims a 4.9 rating from 300 reviews. That rating then has to appear on the page as well. If Mei Ling's markup lists a cake at S$45 (an invented figure), shoppers must be able to see S$45 on her page. Markup that describes hidden or misleading content can bring a manual action, a penalty that can strip rich results from your site.

The facts in your markup also have to be correct and up to date. When your hours change for Hari Raya or Chinese New Year, change them on the page and in the markup at the same time. The other option is to keep the markup to your regular hours as they appear on the page.

Adding markup and testing it

Begin with a single priority page from your keyword map. Choose one type that honestly fits that page, then look it up in the search gallery to make sure Google still supports it and to see which properties it needs.

You can add the markup in one of three ways. First, see whether your website builder or a plugin already adds basic LocalBusiness or Article markup once you have entered your business details. If it doesn't, try a free structured data generator: you fill in a form, then paste the JSON-LD it gives you into the page's code. The third way is to write the markup by hand, starting from an example in Google's documentation for your chosen type and replacing its details with yours. Whichever way you pick, go through the markup and check that every fact in it appears on the page and is accurate and current.

Next, put the page address or the code block into Google's Rich Results Test. The test reports whether your markup is valid and which rich results the page may qualify for. It lists errors and warnings separately. You must fix every error. Warnings point to optional properties you can add if you want to. Once the errors are fixed, run the test again and confirm the page passes before you move on.

Pick one priority page from your keyword map and one type that honestly describes it. The activity below takes you through writing the markup and running it through the Rich Results Test.

Pick one structured data type for one priority page, write the markup by hand or with a generator, and test it in Google's Rich Results Test.

Course

Junxiong-WFG Organisation is an authorised representative of AIA Financial Advisers Private Limited (Reg. No. 201715016G).