Technical SEO
Key Takeaway

How to add schema markup: pick the right type, generate valid JSON-LD, add it to your page, and test it — so you're eligible for rich results.

How to Add Schema Markup (Step by Step)

To add schema markup, choose the schema type that matches your content, generate the markup as JSON-LD (Google’s recommended format), place it in your page’s HTML, and validate it with Google’s Rich Results Test. The markup must describe content that’s actually visible on the page — done right, it makes you eligible for rich results and helps search and AI understand your page. Here’s the step-by-step.

This guide covers choosing a type, generating JSON-LD, adding it, and testing — the full implementation.

Step 1 — Choose the right schema type

Match the markup to what the page actually is. Common types:

  • Article / BlogPosting — blog posts and articles.
  • LocalBusiness — a business’s info (name, address, hours).
  • Product — products with price and availability.
  • FAQPage — a page with genuine Q&A content.
  • HowTo — step-by-step instructions.
  • BreadcrumbList — the page’s position in your site hierarchy.
  • Organization / Person — brand and author entities.

Pick the type(s) that genuinely fit the page. You can include several relevant types together.

There are a few schema formats, but Google recommends JSON-LD — a block of structured data placed in the page’s HTML, separate from the visible content, which makes it clean to add and maintain. Use JSON-LD rather than the older inline microdata format. It sits in a <script type="application/ld+json"> block.

Step 3 — Generate the markup

You don’t have to hand-write it:

  • Schema generators — tools that let you fill in fields and output JSON-LD.
  • CMS plugins — many platforms (e.g. WordPress SEO plugins) add common schema automatically.
  • By hand — reference schema.org and Google’s structured-data docs for the exact properties.

Fill in accurate values that match the page — real name, real address, real prices, real questions and answers.

Step 4 — Add it to your page

Place the JSON-LD <script> block in your page’s HTML — typically in the <head> or <body>. If you use a CMS, a plugin or a custom-code/header block lets you insert it. For a site you control (like a static or custom build), you output the JSON-LD in the page template. One block can hold multiple connected types using an @graph.

Step 5 — Follow the rules (so you don’t get penalized)

This is the safety step casual tutorials skip: only mark up content that’s actually visible on the page, and keep it accurate. Marking up content that isn’t there, fabricating information, or spamming structured data violates Google’s guidelines and can trigger a manual action. Your schema should faithfully describe the real, visible page — nothing more.

Step 6 — Test and validate

Never ship schema without checking it:

  • Google’s Rich Results Test — confirms your markup is valid and shows which rich results it’s eligible for.
  • The Schema Markup Validator (schema.org) — checks general validity.
  • Search Console — reports on your structured data and any errors, after Google crawls the page.

Fix any errors or warnings the tools flag before considering it done.

Step 7 — Understand what it does (and doesn’t) do

Setting expectations correctly matters: schema makes you eligible for rich results and helps search and AI understand your content — but it’s not a direct ranking boost, and Google decides whether to actually show a rich result. So add it because it helps machines understand and present your page (and supports AEO), not because you expect it to lift rankings by itself.

Choose the right type, generate valid JSON-LD, mark up only real visible content, and test it — that’s schema done properly. (SEO consulting implements structured data correctly across a site — or run a free seo check.)


Frequently asked questions

How do I add schema markup to my website? Choose the schema type that matches your content (like Article, LocalBusiness, FAQPage, or HowTo), generate the markup as JSON-LD using a generator, CMS plugin, or by hand, place the JSON-LD script block in your page’s HTML, ensure it only describes content actually visible on the page, then validate it with Google’s Rich Results Test. Fix any errors, and the page becomes eligible for rich results.

What format should schema markup be in? Google recommends JSON-LD, which is a block of structured data placed in the page’s HTML separate from the visible content. It’s cleaner to add and maintain than the older inline microdata format and is the preferred choice for modern implementation. JSON-LD sits in a script tag with the type application/ld+json and can hold multiple connected schema types together.

Do I need to code to add schema markup? Not necessarily. Many content management systems have plugins that add common schema automatically, and schema generators let you fill in fields and output ready-to-paste JSON-LD without coding. For more control or custom needs, you can write JSON-LD by hand using schema.org and Google’s documentation. On a site you fully control, you’d typically output the markup in the page template.

Can schema markup hurt my SEO? It can if misused. Marking up content that isn’t actually visible on the page, fabricating information, or spamming structured data violates Google’s guidelines and can lead to a manual action against your site. Schema should faithfully describe the real, visible content. Used correctly and honestly, it’s beneficial and safe, but manipulating it to game rich results carries genuine risk.

How do I test my schema markup? Use Google’s Rich Results Test to confirm your markup is valid and see which rich results it’s eligible for, and the Schema Markup Validator on schema.org to check general validity. After Google crawls the page, Search Console also reports on your structured data and flags any errors. Always test and fix any errors or warnings before considering your schema implementation complete.

Does schema markup improve rankings? Not directly. Schema markup doesn’t boost rankings by itself. Its value is making your page eligible for rich results, helping search engines and AI understand your content, and supporting answer-engine visibility. Google decides whether to actually show a rich result based on your valid markup. Add schema because it helps machines interpret and present your page well, not as a direct ranking tactic.

Which schema types should I use? Use the types that genuinely match your content: Article or BlogPosting for posts, LocalBusiness for a business’s details, Product for products, FAQPage for real Q&A content, HowTo for step-by-step guides, BreadcrumbList for site hierarchy, and Organization or Person for brand and author entities. You can combine several relevant types on one page. Choose based on what the page actually is, not to chase every possible rich result.


Written by Bryan Collins, SEO & AEO strategist. Want structured data done right across your site? See how I work with clients on SEO or run a free visibility check.

Want Bryan to review your site?

Free Lead Leak Audit — Bryan personally reviews your Google presence, site speed, reviews, and local visibility.

Get My Free Audit →