
Get a counselling call
How to Add Schema Markup to a Website: A 2026 Step by Step Guide
To add schema markup to a website, write your structured data in JSON-LD using vocabulary from schema.org, wrap it in a <script type="application/ld+json"> tag, and place that tag in the page <head> or just before the closing </body>. Pick the schema type that matches the visible content (Article, Product, LocalBusiness, and so on), then confirm it with Google's Rich Results Test and the Schema Markup Validator before you publish. On WordPress you can skip the code and let a plugin such as Yoast or Rank Math output the markup for you.
That is the whole job in two sentences. Whether you searched how to add schema markup in website or how to add schema markup to website, the process is identical. The rest of this guide explains what schema markup is, the code that goes on the page, the three ways to install it, and one important thing most guides published before mid 2026 still get wrong.
What is schema markup?
Schema markup is a form of structured data that tells a search engine what your content means, not just what it says. It uses a shared vocabulary published at schema.org to label specific facts on a page, such as an article's author, a product's price, or a business's opening hours. Google, Microsoft, Yandex, and other companies founded schema.org in 2011, and the vocabulary now covers more than 800 types.
When people ask "what is schema in SEO" or "what is schema markup in SEO," this is the answer: it is the labelling layer that turns human-readable text into machine-readable facts. A price of "4.8" sitting in your HTML is just a number to a crawler. Mark it up as an AggregateRating and the crawler knows it is a rating out of five. That clarity is why schema markup in SEO matters. It does not make your writing better, it makes your meaning unambiguous.
One point to set straight early, because it decides how much you should expect from this work: Google has stated that structured data is not a ranking factor. In Google's own words, "Structured data is not used for ranking purposes, but it can enable search result enhancements and content discovery." So schema will not push you up the results by itself. What it can do is make your listing eligible for richer displays and help engines understand and surface your content. Treat it as a clarity and eligibility tool, not a rank lever.
The three formats, and why website schema is almost always JSON-LD
Google reads structured data in three formats: JSON-LD, Microdata, and RDFa. You only need to choose one.
JSON-LD is a block of JavaScript Object Notation that sits in a <script> tag, separate from your visible HTML. Google has recommended JSON-LD as its preferred format since 2017 because the markup lives in one place and does not tangle with your page content, which makes it far easier to maintain.
Microdata is the older inline approach. Instead of a separate script, you add attributes directly to your existing HTML tags: itemscope, itemtype, and itemprop. If you have searched for "microdata html" or "html microdata," this is what you found. Microdata still works and Google still reads it, but because every attribute is woven into the markup, it is fiddly to edit and easy to break during a redesign.
RDFa is an HTML5 extension that, like Microdata, adds attributes to visible elements. It is the least common of the three on ordinary marketing sites.
For almost every website, JSON-LD is the right call. It is the format Google prefers, the format nearly every plugin and generator outputs, and the one you can drop in or pull out without touching a single line of your page copy. The rest of this guide uses JSON-LD.
How to add schema markup to your website, step by step
Here is the full process, whether you hand-code it or use a tool.
Step 1: Choose the schema type that fits the page
Match the type to what the page actually is. A blog post uses Article (or BlogPosting). A store page uses Product. A physical business uses LocalBusiness. A step by step tutorial can use Article. Recipes use Recipe, events use Event, and so on. Browse Google's list of structured data that is supported in Search to see which types can currently produce an enhanced result, then open the schema.org page for that type to see its properties. Use the most specific type that honestly describes the content, and only mark up content that is actually visible on the page. Marking up hidden text is against Google's guidelines.
Step 2: Write or generate the schema code
You have three realistic routes here.
The fastest is a schema generator. Free tools such as the Schema Markup Generator on technicalseo.com let you fill in fields and copy out clean JSON-LD, with a live preview as you go. Good for one-off pages.
The most flexible is writing it by hand, which is worth learning because it lets you nest data and match your content exactly. Here is a real schema example for a blog article. Swap the values for your own:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Add Schema Markup to a Website",
"author": {
"@type": "Person",
"name": "Your Author Name"
},
"publisher": {
"@type": "Organization",
"name": "Your Site Name",
"logo": {
"@type": "ImageObject",
"url": "https://www.example.com/logo.png"
}
},
"datePublished": "2026-09-21",
"dateModified": "2026-09-21",
"image": "https://www.example.com/article-image.jpg",
"mainEntityOfPage": "https://www.example.com/how-to-add-schema-markup-website/"
}
</script>
And here is a Product schema example, one of the types that still reliably earns a rich result with star ratings and price:
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Product",
"name": "Example Running Shoe",
"image": "https://www.example.com/shoe.jpg",
"description": "Lightweight road running shoe.",
"brand": {
"@type": "Brand",
"name": "Example Brand"
},
"offers": {
"@type": "Offer",
"price": "89.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
},
"aggregateRating": {
"@type": "AggregateRating",
"ratingValue": "4.6",
"reviewCount": "128"
}
}
</script>
The third route is to ask an AI assistant to draft the JSON-LD for you, for example "Create JSON-LD Article schema with headline, author, publisher, and dates." The output is usually valid and is a fine starting point, but you still have to check it in Step 4 and make sure every value matches what is visible on the page.
Step 3: Add the schema markup to your site
Once you have the JSON-LD, it needs to go live where crawlers can find it. Where you paste it depends on how your site is built.
If you edit code directly, put the whole <script type="application/ld+json"> block in the <head> of the page, or immediately before the closing </body> tag. Both positions work, as long as the script loads with the page. For a site with many similar pages, add it at the template level so every page of that type carries it consistently.
If you run WordPress, you usually do not touch code at all. Yoast SEO adds Article, WebPage, and Organization schema automatically. Rank Math includes a schema generator that supports Product, Course, and more, with a per-page editor. Dedicated plugins such as Schema and Structured Data for WP cover 30 plus types. On Shopify, Wix, Squarespace, and Webflow, either the theme includes basic schema or the platform gives you a field to paste your JSON-LD into. Webflow, for instance, has a schema markup field in Page settings.
Step 4: Validate before you publish
Never ship schema without testing it. A single misplaced comma can make a crawler ignore the whole block. Use two tools, because they answer two different questions.
The Schema Markup Validator at validator.schema.org checks your markup against the schema.org vocabulary and flags syntax errors and unrecognised properties. This is the general-purpose check. It is the tool Google kept when it retired the old Structured Data Testing Tool and moved that general validation to schema.org.
Google's Rich Results Test answers the Google-specific question: is this page eligible for a Google rich result, and which one. Paste the URL or the code, and it tells you what Google can generate. Start here whenever your goal is a search feature.
You can paste raw code into either tool before the page is live, or enter the URL once it is published. Fix anything flagged, then re-test until it passes.
Step 5: Keep it accurate and let Google recrawl
Schema has to keep matching the visible page. If a price, date, or availability changes on the page, the markup has to change too. Mismatched structured data can be ignored or flagged as untrustworthy. After you publish or update, you can request indexing in Google Search Console, and the Enhancements reports there will show any structured data errors Google finds in production.
Does schema markup still earn rich results in 2026? A necessary update
This is where a lot of older advice is now wrong, so read this section even if you have added schema before.
Google has been steadily retiring rich result types that were low value or heavily abused. The big ones to know:
HowTo rich results were deprecated in September 2023, on both desktop and mobile. Google removed the documentation. The HowTo markup is no longer a search feature.
FAQ rich results were restricted to authoritative government and health sites in August 2023, then fully deprecated on 7 May 2026. FAQ rich results no longer appear in Google Search for any site. This is the claim to watch for: many guides, including ones updated in 2026, still tell you that FAQ schema earns an expandable Q&A box under your listing. As of May 2026 it does not.
Google also retired several niche types across 2025 and early 2026.
Here is the nuance that matters. Deprecating the rich result is not the same as banning the markup. FAQPage and HowTo are still valid schema.org types. Google has said unused structured data does not cause problems and the markup can stay in place. It simply will not produce a visible search feature anymore.
Plenty of types do still earn rich results, and these are where your effort pays off: Product (price, availability, star ratings), Review, Recipe, Event, Article, Breadcrumb, Video, and others in Google's current gallery. The Rich Results Test in Step 4 is the honest arbiter of what is live today.
What about schema markup and AI Overviews?
Since search now answers many queries with AI Overviews and AI Mode, people reasonably ask whether schema is the key to getting cited there. The honest answer from Google's own guidance: there is no special schema.org markup required for AI Overviews or AI Mode. Google does add that any structured data you use should match the visible content on the page. So schema is not a secret AI ranking trick. It remains a comprehension and eligibility layer. Clear structure, accurate markup, and content that matches what you claim all help machines read you correctly, which is worth doing regardless of which surface the answer appears on.
Should you add schema markup site-wide?
For website schema that applies everywhere, add Organization and WebSite markup once, typically on the home page or in a global template, so engines have a consistent record of your brand, logo, and site name. Beyond that, add page-level schema where it fits the content: Article on posts, Product on store pages, LocalBusiness on contact or location pages. You do not need every type on every page. Combining a few relevant types across the right pages gives Google a clearer picture than stuffing one page with markup that does not describe it.
Common mistakes to avoid
Marking up content that is not visible on the page.
Letting the markup drift out of sync with the visible price, date, or rating.
Using a broad type when a specific one exists, for example Thing instead of Product.
Adding two plugins that both output schema, which can create duplicate or conflicting blocks.
Assuming valid markup guarantees a rich result. It only makes the page eligible. Google still decides whether to show one.
Conclusion
Adding schema markup to a website comes down to five moves: choose the right type, write it in JSON-LD, drop it in the <head> or before </body> (or let a plugin do it), validate with both the Schema Markup Validator and the Rich Results Test, and keep it matching the page. Do that on the pages where a rich result is still available, such as products, reviews, and events, and you give both search engines and AI systems a cleaner, more accurate read of your content. Start with your highest-value template, add the markup, and run it through the Rich Results Test today.
About the Author
Jugal Chauhan
Jugal Chauhan is a digital marketing strategist and tech educator with a passion for making complex topics accessible. He writes about marketing, technology, and professional growth to help learners and businesses thrive in the digital age.
Learn more about us →