Sep
23

Schema Markup for Beginners: What JSON-LD Does and Which Types to Use

A beginner-friendly explanation of structured data and JSON-LD, the schema types most sites need, and how to add and test them.

Search engines are good at reading text, but they still have to guess what a page is. Is "Oakline, 12 Mill Road, open 9 to 5" a business listing or a line from a story? Structured data removes the guesswork by describing the page in a shared vocabulary called schema.org. When search engines trust that description, they can show extra details in results, such as breadcrumbs, star ratings or event dates.

What JSON-LD is

There are several ways to add structured data, but the one Google recommends is JSON-LD: a small block of JSON inside a script tag. It sits in the page's HTML but does not change what visitors see:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Oakline",
  "url": "https://oakline.example",
  "logo": "https://oakline.example/logo.png"
}
</script>

@context says which vocabulary is being used, @type says what kind of thing is described, and the other properties fill in the details.

The types most sites need

Organization

Describes the business or project behind the site: its name, website, logo and social profiles. It usually goes on the homepage.

LocalBusiness

For a business with a physical location that customers visit: address, phone number, opening hours and price range. There are more specific subtypes such as Restaurant, Store or AutoRepair; use the closest match.

Article or BlogPosting

For news stories and blog posts: the headline, the author, the publish and update dates and an image. It helps search engines connect content with the person who wrote it.

BreadcrumbList

Describes where a page sits in the site's structure, such as Home › Blog › This Post. Google can show this path in place of the plain URL in results.

FAQPage

For a page that lists questions with their answers. Google has limited FAQ rich results to a small set of authoritative sites, so do not expect the expandable questions to appear in results for most sites. The markup is still valid and still describes your content accurately.

Rules to follow

  • Only mark up what visitors can see. If the page does not show a question and answer, do not put them in FAQ markup. Google treats hidden or misleading structured data as spam.
  • Keep it accurate. Update opening hours, prices and dates in the markup when they change on the page.
  • Fill in the required properties. Each rich result type has required and recommended fields. Missing required fields make the markup ineligible.
  • Do not expect a ranking boost. Structured data helps search engines understand the page and can make the result more attractive, but the content still has to earn its position.

How to add it

  1. Pick the type that matches the page.
  2. Generate the JSON-LD. The Schema Markup Generator builds FAQ, Article, Organization, Local Business and Breadcrumb markup from a form, and leaves out any field you did not fill in.
  3. Paste the script block into the page's HTML. Most content management systems have a field or plugin for adding code to the head of a page.
  4. Test it with Google's Rich Results Test, and keep an eye on the enhancement reports in Google Search Console.

Check that it is really there

Plugins, themes and caching can all strip or duplicate code. After publishing, run the page through the On-Page SEO Checker: it lists every JSON-LD type it finds, alongside the rest of the page's on-page SEO basics.