
Learning how to add schema markup is one of the highest-value technical SEO skills you can pick up, and it takes about fifteen minutes per page type once you know the process. Schema markup is a small block of code that tells search engines what your page is about: this is an article, this is a recipe, this is a local business. Search engines can then show your result with extra detail โ star ratings, prices, cooking times โ in what Google calls rich results. Adding schema does not guarantee rich results. What it does is make your pages eligible, and give search engines the labelled facts they need.
What Is Schema Markup?
Schema markup, also called structured data, is a shared vocabulary defined at schema.org that labels the parts of a page for search engines. A human reader can see that a page is a recipe because it has ingredients and steps; a search engine sees only text, so schema labels those parts explicitly: this is the ingredients, this is the cooking time, this is the author.
Google supports three formats: JSON-LD, Microdata, and RDFa, and recommends JSON-LD, because it sits in one script block instead of being woven through your HTML. A JSON-LD block is a <script type="application/ld+json"> element holding one JSON object with a @context of https://schema.org and a @type naming the kind of thing the page describes. Place it in the <head> or at the end of the <body> โ Google reads it in either place.
The most important rule: mark up only content a visitor can see on the page. Do not mark up a fact the reader cannot see. Search engines treat hidden or invented markup as spam, and it can earn a manual penalty rather than a rich result.
Why Schema Markup Matters
Schema markup matters because it removes ambiguity. Two pages can both say "chocolate cake recipe", but only the one with Recipe schema tells Google the cooking time, servings, and ingredients in a structured form. That page becomes eligible for rich results: recipe cards with times and ratings, product listings with prices, and article results with dates and images.
That eligibility is the key point: schema makes your page a candidate for rich results, not a guarantee of them. Google decides which results get enhanced display. The value is still real: rich results take up more space and answer the searcher's question before the click, so they tend to earn more clicks. It also helps AI assistants understand your content. Our guide on how to optimize for voice search explains how that same labelling helps voice assistants pick your page as the spoken answer.
Which Schema Types Should You Use?
Most sites need only a few types. Start with the ones that match the pages you actually have โ search engines penalise abusive markup.
Article or BlogPosting. Use on blog posts and news articles. It labels the headline, author, publish date, and image. Google recommends author, datePublished, dateModified, headline, and image, and lists no required properties.
FAQPage. Use on pages with a question-and-answer section. FAQ rich results have been limited to government and health sites since 2023, so on most sites it will not earn extra space โ but it still describes the page clearly.
HowTo. Use on step-by-step guides. Google no longer shows HowTo rich results, but the markup still labels the page's structure.
Product. Use on product pages, with name and at least one of offers, review, or aggregateRating. This is the type behind price and availability in search results.
Recipe. Use on recipe pages, with ingredients, instructions, cooking time, and servings. Recipe rich results show times and ratings directly in the results.
LocalBusiness. Use on business homepages and location pages, with name, address, phone number, and opening hours. It supports local search and map results.
BreadcrumbList. Use on every non-homepage. It tells Google the page's position in your site and can turn a plain URL into a readable breadcrumb trail.
Organization and WebSite. Add one Organization block in your site's root <head> with your name, logo, and social profiles, plus a WebSite block that can enable a sitelinks search box.
How to Add Schema Markup: Three Methods
Method 1: Use an SEO Plugin (WordPress)
On WordPress, an SEO plugin such as Rank Math or Yoast outputs most schema for you. Install the plugin, choose a schema type for each post type โ Article for posts, Product for shop pages โ map the fields, such as the post title to headline, and check the output on one page of each post type. Rank Math also adds FAQ schema from blocks you write in the editor. This is the fastest route for most sites.
Method 2: Add JSON-LD by Hand
On Webflow, Squarespace, Wix, Shopify, or a custom site, paste a JSON-LD script into the page template or the page's <head>. Here is a short Article example:
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Add Schema Markup to Your Website",
"author": { "@type": "Organization", "name": "SEOmash" },
"datePublished": "2026-12-06",
"dateModified": "2026-12-06",
"image": "https://seomash.xyz/images/how-to-add-schema-markup.jpg"
}
In Next.js, render the same <script> element in the page component (App Router) or inside next/head (Pages Router). The markup is in the server HTML, so Google does not need to run your JavaScript to find it. If a value comes from your CMS, escape < in the JSON so it cannot close the script element.
Method 3: Use a Markup Generator
If you do not want to write code, use a generator: Google's structured data documentation has copy-paste examples for every supported type, and tools such as Merkle's schema generator and Schema App produce valid blocks from a form. Generate the block, check it with a validator, then paste it into the page. Generators are the safest way to build Product and Recipe markup, where a missing required property is the most common failure.
How to Test Schema Markup
Never treat markup as done until you have tested it. Run three checks, in this order.
1. Google's Rich Results Test. Open search.google.com/test/rich-results and paste a URL or code. It shows which rich result types the page is eligible for, and lists errors โ a missing required property blocks the rich result โ and warnings, which do not. It only covers types Google uses for rich results.
2. The Schema Markup Validator. Run the same page through validator.schema.org. It checks all schema.org types, including ones Google does not use for rich results, such as Service, and catches typos in property names.
3. Google Search Console. After the markup is live, the reports under Enhancements โ Breadcrumbs, Products, Review snippets โ show valid and invalid items across the whole site. Fix errors, then click Validate fix. For schema added by JavaScript, use URL Inspection and Test live URL. Our guide on how to use Google Search Console walks through these reports step by step.
Common Mistakes to Avoid
Marking up invisible content. The most common mistake, and the one search engines punish. If the price, rating, or answer is not visible on the page, do not put it in the markup.
Choosing the wrong type. A blog post is an Article, not a Product. The wrong type will not earn a rich result, and it can confuse Google about what the page is.
Adding spammy markup. Do not add aggregateRating to a page with no reviews, do not invent prices, and do not mark up the same content twice with conflicting values. Fake structured data is a spam signal.
Publishing untested changes. Schema errors are silent โ the page looks fine while Google quietly ignores the markup. Always run the Rich Results Test before you treat the work as done, and re-test after every template change.
Expecting instant rich results. Even valid markup takes time. Google has to recrawl the page and decide it deserves an enhanced result. Give it a few weeks, then check the Enhancements reports. If your site has crawl problems, fix those first โ our guide on how to find and fix broken links covers one of the most common causes.
Start With One Page Type
How to add schema markup comes down to a simple habit: pick the page type that matters most, add the one schema type that matches it, test it, and repeat for the next type. For most blogs that means Article on every post plus BreadcrumbList site-wide. For shops it means Product on every product page. For local businesses it means LocalBusiness on the homepage.
Do one type well before you add the next. Valid, tested markup on your most important pages is worth far more than half-finished schema scattered across the site.