How to Add Structured Data to Your Website
Summary: To add structured data to your website, create a JSON-LD script block using Schema.org vocabulary, place it in your page's <head> section, and validate it with Google's Rich Results Test. Websites with properly implemented structured data can see up to 30% higher click-through rates from rich snippets like star ratings, FAQ dropdowns, and product prices displayed directly in search results.
Structured data is how you speak directly to Google in a language it understands. Done right, it unlocks rich results in search — star ratings, FAQs, breadcrumbs, event listings, and product prices — all displayed directly in the SERP before anyone clicks. Done wrong or not done at all, you hand those rich snippets to your competitors.
According to a Google study on structured data, pages with valid schema markup are eligible for over 30 different types of rich results — from recipe cards to job postings to how-to carousels. Yet the majority of websites still don't implement any structured data at all, leaving enormous search visibility on the table.
What Is Structured Data?
Structured data is a standardised format for providing information about a page and its content to search engines. It uses a vocabulary called Schema.org — a shared standard maintained by Google, Microsoft, Yahoo, and Yandex since 2011. Think of it as metadata that tells search engines exactly what your content means, not just what words are on the page.
The most common format is JSON-LD (JavaScript Object Notation for Linked Data), which Google officially recommends. It's added as a <script> block in your page's <head> or <body>:
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "LocalBusiness", "name": "MobileBarn", "address": { "@type": "PostalAddress", "streetAddress": "123 Main Street", "addressLocality": "Sydney", "addressRegion": "NSW", "postalCode": "2000", "addressCountry": "AU" }, "telephone": "+61-2-1234-5678", "url": "https://mobilebarn.shop" } </script>There are three formats for structured data: JSON-LD, Microdata, and RDFa. JSON-LD is the clear winner — it's the only format Google recommends, it lives in a separate script block (so it doesn't clutter your HTML), and it's the easiest to maintain and debug. According to a web.dev analysis, JSON-LD accounts for over 60% of all structured data implementations on the web.
Schema types relevant to most websites include: LocalBusiness, Product, Article, FAQPage, BreadcrumbList, Review, Event, HowTo, Recipe, VideoObject, and WebSite. The Schema.org vocabulary contains over 800 types and 1,400 properties, but most sites only need a handful.
Why Structured Data Matters for SEO
Author, Organization, and Review help Google verify your expertise and trustworthiness — key components of Google's E-E-A-T (Experience, Expertise, Authoritativeness, Trustworthiness) quality framework.Your structured data also works hand-in-hand with other on-page SEO elements. A well-optimised title tag combined with schema markup makes your SERP listing dramatically more clickable. Similarly, your meta description provides the supporting text below the rich result, creating a complete, compelling search listing.
Types of Structured Data and When to Use Each
Choosing the right schema type for each page is critical. Here's a comprehensive breakdown:
LocalBusiness / Organization
Best for: Homepages, about pages, contact pages of businesses with physical locations.
This schema type powers the Knowledge Panel that appears on the right side of Google search results when someone searches for your business name. It includes your name, address, phone number, opening hours, reviews, and logo. For businesses with multiple locations, use a separate LocalBusiness schema for each location page.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "LocalBusiness", "name": "MobileBarn", "image": "https://mobilebarn.shop/images/storefront.jpg", "telephone": "+61-2-1234-5678", "url": "https://mobilebarn.shop", "address": { "@type": "PostalAddress", "streetAddress": "123 Main Street", "addressLocality": "Sydney", "addressRegion": "NSW", "postalCode": "2000", "addressCountry": "AU" }, "openingHoursSpecification": [ { "@type": "OpeningHoursSpecification", "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"], "opens": "09:00", "closes": "17:30" } ], "priceRange": "$$", "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.8", "reviewCount": "127" } } </script>Product
Best for: E-commerce product pages, service pricing pages.
Product schema triggers rich results showing price, availability, review ratings, and shipping info directly in search results. According to Google, product rich results can increase click-through rates by up to 35% for e-commerce listings. Essential properties include name, image, offers (with price and availability), and aggregateRating if you have reviews.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "name": "iPhone 15 Screen Repair", "image": "https://mobilebarn.shop/images/iphone-15-repair.jpg", "description": "Same-day iPhone 15 screen replacement using OEM-quality parts.", "brand": { "@type": "Brand", "name": "MobileBarn" }, "offers": { "@type": "Offer", "url": "https://mobilebarn.shop/repairs/iphone-15-screen", "priceCurrency": "AUD", "price": "199.00", "availability": "https://schema.org/InStock", "priceValidUntil": "2026-12-31" }, "aggregateRating": { "@type": "AggregateRating", "ratingValue": "4.9", "reviewCount": "85" } } </script>Article / BlogPosting
Best for: Blog posts, news articles, guides, tutorials.
Article schema helps Google understand the author, publication date, and topic of content pieces. It can trigger the article carousel in Google News and may display author information, publish date, and thumbnail images in regular search results. Always include author, datePublished, dateModified, and headline properties.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "How to Add Structured Data to Your Website", "author": { "@type": "Person", "name": "Dane Armour" }, "datePublished": "2026-03-10", "dateModified": "2026-03-10", "image": "https://getclarityseo.com/images/structured-data-guide.jpg", "publisher": { "@type": "Organization", "name": "Clarity SEO", "logo": { "@type": "ImageObject", "url": "https://getclarityseo.com/logo.png" } } } </script>FAQPage
Best for: Any page with frequently asked questions, support pages, guides with Q&A sections.
FAQ schema creates expandable question-and-answer dropdowns directly in Google search results. This dramatically increases the visual footprint of your listing. A study by Search Engine Land found that FAQ rich results can double the height of your search listing, pushing competitors below the fold. Note that Google reduced FAQ rich result visibility in 2023 — they now only appear for well-known government and health authority websites in some regions — but they remain valuable for Google's content understanding and voice search.
<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "FAQPage", "mainEntity": [ { "@type": "Question", "name": "How long does iPhone screen repair take?", "acceptedAnswer": { "@type": "Answer", "text": "Most iPhone screen repairs take 30-60 minutes." } } ] } </script>BreadcrumbList
Best for: Any page with hierarchical navigation (almost every page on your site).
Breadcrumb schema replaces the raw URL in search results with a clean, clickable breadcrumb trail (e.g., "Home > Guides > Structured Data"). This improves usability and makes your listing look more professional. It's one of the easiest schemas to implement and has near-universal benefit.
HowTo
Best for: Tutorial pages, step-by-step guides, DIY instructions.
HowTo schema can trigger a step-by-step rich result with images, estimated time, and materials needed. It's particularly powerful for "how to" queries, which make up a significant portion of informational searches.
WebSite (with SearchAction)
Best for: Your homepage only.
WebSite schema with a SearchAction can trigger a sitelinks search box in Google results — a search bar that lets users search your site directly from the SERP. This appears for branded queries and significantly boosts perceived authority.
How to Check Your Structured Data
Clarity SEO's Schema Generator lets you build valid structured data for your site type — no coding required. Generate, copy, and paste in under two minutes.
Run the full Report Card to check whether your site already has structured data and whether it has any validation errors.
Google also provides a free Rich Results Test and Schema Markup Validator you can use to verify your implementation. The Rich Results Test shows which rich result types your page qualifies for, while the Schema Markup Validator checks for syntax errors and missing required properties.
For ongoing monitoring, use Google Search Console's Enhancements reports. These show how many pages have valid structured data, how many have errors or warnings, and which specific issues need fixing. Search Console is the only tool that shows you which rich results Google has actually indexed and displayed for your pages.
How to Add Structured Data: Step-by-Step
For HTML/Generic
Step 1: Choose the right schema type for your page.
Match the schema type to your page content:
Organization or LocalBusinessArticle or BlogPostingProductFAQPageRecipeEventHowToVideoObjectJobPostingCourseStep 2: Generate your JSON-LD.
Use Clarity SEO's Schema Generator, Google's Structured Data Markup Helper, or write it manually. Always include all required properties listed in the Google Search Gallery for your chosen type.
Step 3: Add the <script> block to your page.
Place it in the <head> section of your HTML. While JSON-LD technically works in the <body> too, the head is cleaner and ensures Google sees it before rendering the page.
Step 4: Validate using Google's Rich Results Test.
Paste your page URL or code snippet into the Rich Results Test. Fix any errors (red) and address warnings (yellow) before publishing.
Step 5: Monitor in Search Console.
After deploying, check the Enhancements section of Google Search Console within a few days to confirm Google has detected and validated your structured data.
For Next.js / React
In Next.js (App Router), add JSON-LD structured data using a <script> tag inside your page component:
// app/page.tsx
export default function Page() {
const jsonLd = {
'@context': 'https://schema.org',
'@type': 'LocalBusiness',
name: 'MobileBarn',
url: 'https://mobilebarn.shop',
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
{/* page content */}
</>
);
}For dynamic pages (e.g., product pages from a CMS), populate the JSON-LD object from your data source. This ensures each page gets accurate, unique structured data without manual maintenance.
For WordPress
With Yoast SEO:
Yoast automatically adds Article, WebPage, and BreadcrumbList schema based on your page type. For FAQPage schema, add a FAQ block using the Gutenberg FAQ block — Yoast converts it to schema automatically. For more control, go to Yoast SEO → Schema in the post editor sidebar.
With Rank Math:
Rank Math has a dedicated Schema module. Go to Rank Math → Titles & Meta → Schema Markup to set default schema types per post type. On individual pages, use the Schema tab in the editor sidebar to add and customise schema. Rank Math supports 20+ schema types out of the box, including Product, Recipe, Event, and Course.
With Schema & Structured Data for WP & AMP (plugin):
A standalone plugin dedicated entirely to schema markup. Free version supports most common types. Install via Plugins → Add New, search "Schema & Structured Data".
Manual method (any theme):
Add JSON-LD directly to your theme's header.php using wp_head action hook. This gives you complete control but requires PHP knowledge and careful maintenance.
For Shopify
Shopify's default themes include basic Product schema automatically. To add custom schema or enhance existing markup:
templates/product.json or sections/main-product.liquid).<script type="application/ld+json"> block with your schema using Liquid variables:<script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "name": {{ product.title | json }}, "description": {{ product.description | strip_html | json }}, "image": "https:{{ product.featured_image | image_url }}", "offers": { "@type": "Offer", "price": {{ product.price | money_without_currency | json }}, "priceCurrency": {{ cart.currency.iso_code | json }}, "availability": {% if product.available %}"https://schema.org/InStock"{% else %}"https://schema.org/OutOfStock"{% endif %} } } </script>For FAQ and breadcrumb schema on Shopify, consider apps like JSON-LD for SEO by Ilana Davis or Smart SEO — both automatically generate schema for collection pages, blog posts, and product pages.
For Wix / Squarespace / Webflow
Wix: Use Settings → SEO Tools → Structured Data Markup to add custom JSON-LD per page. Wix also adds some schema automatically for Business Info. For blog posts, Wix adds Article schema automatically if you've filled in the SEO settings.
Squarespace: Add JSON-LD via Settings → Advanced → Code Injection (site-wide) or individual page Page Header Code Injection (per-page). Squarespace adds basic LocalBusiness and WebSite schema automatically if you've configured your business info in settings.
Webflow: Add JSON-LD via Page Settings → Custom Code → Inside <head> tag. For CMS-powered pages, use Webflow's embed component inside the template layout with dynamic field references. This is powerful because each CMS item gets unique schema data automatically.
Advanced Structured Data Strategies
Nesting Multiple Schema Types
You can include multiple JSON-LD blocks on a single page, each with a different schema type. A product page might have Product, BreadcrumbList, and FAQPage schemas — all valid simultaneously. You can also nest related schemas within a single block using the @graph property to combine them cleanly.
Using @id for Entity Linking
For larger sites, use @id properties to link related schema entities across pages. For example, your Organization schema on the homepage can be referenced by Article schemas on blog posts as the publisher. This builds a connected knowledge graph that helps Google understand your entire site as a coherent entity.
Schema for E-commerce
E-commerce sites benefit enormously from comprehensive schema. Beyond basic Product schema, implement AggregateOffer for products with multiple variants/sizes, Review for individual customer reviews, and ItemList for collection/category pages. Google Merchant Center data combined with Product schema significantly improves visibility in Google Shopping results.
Structured Data and Open Graph Tags
Structured data and Open Graph tags serve different purposes but complement each other. Schema is for search engines; Open Graph is for social platforms. Both should be present and consistent — conflicting information between them can cause issues with how your content appears across platforms.
Common Mistakes to Avoid
Product schema says "In Stock" but the product page says "Sold Out", Google may issue a manual action for misleading markup. Schema data must accurately reflect visible page content at all times.Product schema to a blog post or Article schema to a product page — match the schema to the actual content. Google's guidelines explicitly warn against mismatched schema types.Organization schema sitewide when only the homepage needs it.Product schema, you may end up with conflicting data.Structured Data and SEO Scoring
Most SEO audit tools — including Clarity SEO — check for structured data as part of their scoring criteria. Having valid schema markup contributes positively to your overall SEO score. Missing or invalid schema typically costs you points in technical SEO audits, while proper implementation signals a well-optimised site.
Your structured data also benefits from a well-configured robots.txt file — if Googlebot can't crawl a page, it can't discover the schema on it. Similarly, ensuring your site is mobile-friendly matters because Google uses mobile-first indexing, meaning it primarily crawls and indexes the mobile version of your pages (and their schema).
Structured Data Optimization Checklist
Use this checklist when implementing structured data on any page:
FAQ
What is structured data in SEO?
Structured data is machine-readable code (typically JSON-LD) added to a webpage that helps search engines understand the content's meaning and context. It uses the Schema.org vocabulary — a standard co-created by Google, Microsoft, Yahoo, and Yandex. It enables rich results in Google Search, like star ratings, FAQ dropdowns, product prices, breadcrumb trails, and event listings. Without structured data, Google can only infer content meaning from the text on the page; with it, you're explicitly telling Google what your content represents.
Does structured data directly improve Google rankings?
Structured data is not a direct ranking factor — Google's John Mueller has confirmed this multiple times. However, it enables rich results, which significantly increase click-through rate. Higher CTR can indirectly improve rankings over time because Google's algorithms factor in user engagement signals. A Backlinko analysis found that pages moving from position #10 to #1 see a 10x increase in clicks — and rich results help you stand out at every position. Google has also indicated that schema helps with content understanding, which supports rankings indirectly.
What is the best format for structured data?
Google recommends JSON-LD for structured data. It's the easiest to implement, maintain, and validate. Unlike Microdata (which requires adding attributes directly to HTML elements) or RDFa (which uses namespace declarations), JSON-LD sits in a separate <script> block that doesn't affect your page's visible HTML. This makes it easier to add, update, or remove without touching your templates. According to Google's own documentation, "Google recommends using JSON-LD for structured data whenever possible."
How do I test if my structured data is working?
Use Google's free Rich Results Test by entering your URL. It shows which schema types Google detects and any validation errors. You can also use the Schema Markup Validator for comprehensive syntax checking. For ongoing monitoring, use Google Search Console's Enhancements reports — they show how many pages have valid schema, how many have errors, and which specific pages need attention. Check at least monthly, especially after site updates.
Can I add multiple schema types to one page?
Yes. You can include multiple JSON-LD script blocks on a single page, each with a different schema type. For example, a product page might have Product, BreadcrumbList, and FAQPage schemas — all valid simultaneously. You can also combine them into a single block using the @graph property. The key rule: each schema type must accurately represent content visible on that specific page.
How long does it take for rich results to appear after adding structured data?
After adding valid structured data, it typically takes a few days to a few weeks for Google to recrawl your page and start displaying rich results. The timeline depends on how often Google crawls your site and whether your schema passes validation. You can speed up the process by submitting the updated URL for re-indexing via Google Search Console's URL Inspection tool. Note that having valid schema doesn't guarantee rich results — Google decides whether to display them based on content quality, relevance, and other factors.
Related Guides
Structured data is one part of a complete SEO strategy. Explore these related guides to optimise your entire search presence:
Summary
Structured data is one of the highest-leverage SEO tactics available — it costs nothing, takes minutes to implement, and can transform how your page appears in search results. Pages with rich results see 20–30% higher click-through rates, and with over 30 rich result types available, there's almost certainly a schema type relevant to your content. Start with the most relevant schema type for your key pages, validate it with the Rich Results Test, monitor it in Search Console, and let Google do the rest.
Check if your site already has schema and whether it has any errors with a free Clarity SEO audit.