Schema markup: what it is and how to add it
Schema markup is a block of code that tells search engines what a page is about in a form they don't have to guess at: this is a product, it costs £49, it's in stock. In return, a page can become eligible for rich results such as star ratings, prices and breadcrumbs in Google.
What schema markup is
"Schema" refers to schema.org, a shared vocabulary of types (Product, Article, LocalBusiness, Event) and their properties (price, author, address, startDate) that Google, Bing and other search engines agreed on. "Markup" is how you attach that vocabulary to a page. The result is often called structured data.
There are three formats: JSON-LD, Microdata and RDFa. Google says all three are fine when they're valid, but recommends JSON-LD where your setup allows it. JSON-LD sits in its own <script> block, separate from the visible HTML, so it is easier to write, read and maintain. Everything below uses it.
What it does for SEO
Structured data does two things:
- It makes a page eligible for rich results: the enhanced listings with prices, availability, ratings, event dates, recipe times or breadcrumb trails. These take more space and tell searchers more before they click.
- It removes ambiguity. A page that says "Apple" and "£49" is clearer to a machine when it is marked up as a
Productwith anOffer. This also helps Google connect your brand, logo and social profiles throughOrganizationmarkup.
What it doesn't do is guarantee anything. Google's documentation describes structured data as making pages eligible for enhanced display, and doesn't describe it as a ranking factor. Valid markup makes a rich result possible; Google decides whether to show one for each search.
Which types still earn rich results
Google's search gallery is the current list, and it changes. These are the ones most sites use:
| Rich result | schema.org type | Good for |
|---|---|---|
| Product | Product with Offer | Online shops: price, availability and, if you have real reviews, ratings |
| Review snippet | Review, AggregateRating | Products, recipes, software and businesses with genuine reviews on the page |
| Article | Article, BlogPosting, NewsArticle | Blogs and news: headline, images, dates and author |
| Breadcrumb | BreadcrumbList | Any site with a hierarchy; the trail replaces the URL in results |
| Local business | LocalBusiness and subtypes such as Dentist | Businesses with an address: opening hours, phone, location |
| Organization | Organization | Your logo, contact details and official profiles |
| Event | Event | Concerts, classes, webinars: dates and venue |
| Recipe, Video, Job posting, Software app | Recipe, VideoObject, JobPosting, SoftwareApplication | Sites built around that content |
Two once-popular types no longer produce rich results. How-to rich results were retired in 2023. FAQ rich results were limited to well-known government and health sites in 2023, and Google stopped showing them altogether in May 2026. The markup is still valid schema.org, and other systems may read it, but adding it to win extra space in Google no longer works.
JSON-LD examples
A product page, with the price and availability that are visible on the page:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Trail Runner 2 Waterproof Shoe",
"image": "https://example.com/img/trail-runner-2.jpg",
"description": "Lightweight waterproof trail shoe with a 6 mm drop.",
"sku": "TR2-WP-42",
"brand": { "@type": "Brand", "name": "Example" },
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "GBP",
"availability": "https://schema.org/InStock",
"url": "https://example.com/shoes/trail-runner-2/"
}
}
</script>
A blog post:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BlogPosting",
"headline": "How to choose a trail running shoe",
"image": "https://example.com/img/choosing-trail-shoes.jpg",
"datePublished": "2026-10-01",
"dateModified": "2026-10-20",
"author": { "@type": "Person", "name": "Sam Lee", "url": "https://example.com/about/sam/" }
}
</script>
A breadcrumb trail, which suits almost every page below the homepage:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{ "@type": "ListItem", "position": 1, "name": "Shoes", "item": "https://example.com/shoes/" },
{ "@type": "ListItem", "position": 2, "name": "Trail running", "item": "https://example.com/shoes/trail/" }
]
}
</script>
Notice the details that trip people up: the price is a plain number with the currency in its own property, dates are ISO 8601 (2026-10-01), and every URL is absolute.
How to add it to your site
- WordPress: SEO plugins such as Yoast and Rank Math output
Article,BreadcrumbList,OrganizationandWebSitemarkup by default, and WooCommerce addsProduct. Check what's already there before adding more, or you'll end up with two conflicting copies. - Shopify: most themes include
Productmarkup in the product template. Apps can extend it, but again check for duplicates first. - Custom sites: generate the JSON-LD in the page template from the same data that renders the page, so the markup can never disagree with what's visible. Put it in the
<head>or anywhere in the<body>. - JavaScript and tag managers: Google can read structured data added with JavaScript, but it's only seen once the page is rendered, and other search engines may not see it at all. Markup in the HTML as served is the safer default.
The rules that keep it working
- Mark up only what people can see. Google says not to add structured data about information that isn't visible on the page, even if it's accurate.
- Include every required property. Missing required properties make the item ineligible for its rich result. Recommended properties are optional but make the result fuller.
- Never invent ratings or reviews. Only mark up genuine reviews that are shown on the page. Made-up ratings are against Google's guidelines and can lead to a manual action that removes your pages' rich results.
- Keep it current. A sold-out product still marked
InStock, or an old price, is a mismatch Google can act on. - Use the most specific type.
Dentistrather thanLocalBusiness,BlogPostingrather thanCreativeWork.
How to test it
Test while you write and again once the page is live. A validator shows every item on the page, which required and recommended properties are missing, and values that machines can't read, such as relative URLs or prices with currency symbols:
Then confirm with Google's Rich Results Test, which renders JavaScript and shows exactly what Google can use. Once the page is indexed, Search Console lists each rich result type it found in its enhancement reports, with errors across the whole site.
Questions
What does schema markup mean?
It means adding code, using the schema.org vocabulary, that describes what a page contains, such as a product, an event or an article, in a standard form search engines can read without guessing.
Is schema markup good for SEO?
Yes, for the right content. It doesn't raise rankings by itself, but it makes pages eligible for rich results, which stand out and tell searchers more before they click. For shops, local businesses, recipes, events and articles it's well worth adding.
What is an example of schema markup?
A Product block giving the product's name, image, price, currency and availability, as in the first example above. Google can use it to show the price and stock status in results.
Is JSON-LD better than Microdata?
Google supports both equally when they're valid, but recommends JSON-LD because it's separate from the HTML and easier to maintain. If your platform already outputs valid Microdata, there's no need to rewrite it.
How long does it take for rich results to appear?
Google has to recrawl the page first, which can take days or weeks. You can request indexing in Search Console's URL Inspection tool. Even then, eligible pages don't always get a rich result.