Clarity
By Clarity SEO

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

  • Rich results: Properly implemented schema can trigger star ratings, FAQ dropdowns, sitelinks, product prices, recipe cards, and more — making your result larger and more visually striking in SERPs. According to Moz research, rich results occupy significantly more visual real estate, pushing competitors further down the page.
  • Higher CTR without ranking changes: Rich results routinely achieve 20–30% higher click-through rates than plain blue links at the same position. A 2023 study by Search Engine Journal found that FAQ rich results alone can increase CTR by up to 87% compared to standard listings.
  • Voice and AI search: Structured data feeds Google's Knowledge Graph and AI-generated answers. If you want to be cited in AI Overviews, schema helps search engines parse your content with confidence. This is increasingly critical as AI search grows.
  • E-E-A-T signals: Schema types like 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.
  • Competitive advantage: Despite the clear benefits, the majority of small business websites still have zero structured data. Implementing schema on your site gives you a tangible edge over competitors who haven't. It's low-effort, high-reward — and completely free.
  • Future-proofing: As search evolves toward semantic understanding, structured data becomes more valuable, not less. Google is expanding the types of rich results it supports every year. Getting your schema foundation right now sets you up for every future enhancement.
  • 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.

    → Open the Schema Generator

    Run the full Report Card to check whether your site already has structured data and whether it has any validation errors.

    → Get your free SEO audit

    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:

  • Homepage / About: Organization or LocalBusiness
  • Blog post: Article or BlogPosting
  • Product page: Product
  • FAQ section: FAQPage
  • Recipe: Recipe
  • Event: Event
  • Tutorial / Guide: HowTo
  • Video: VideoObject
  • Job listing: JobPosting
  • Course: Course
  • Step 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:

  • Go to Online Store → Themes → Edit code.
  • Open the relevant template file (e.g., templates/product.json or sections/main-product.liquid).
  • Add a <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

  • Invalid JSON: A missing comma, bracket, or quotation mark breaks the entire schema block. Always validate with the Rich Results Test before publishing. Pro tip: use a JSON validator like JSONLint first to catch syntax errors.
  • Inaccurate data: If your 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.
  • Irrelevant schema type: Don't add 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.
  • Hidden content in schema: Schema values must reflect content that's visible on the page. Don't add FAQs to your schema that don't exist on the page itself — this violates Google's structured data guidelines and can result in penalties.
  • Only implementing on the homepage: Schema is per-page. Each page should have the appropriate type for its content. A common mistake is adding Organization schema sitewide when only the homepage needs it.
  • Missing required properties: Each schema type has required and recommended properties. Omitting required ones means Google won't generate the rich result. Check the Google Search Gallery for requirements per type.
  • Duplicate schema blocks: Multiple identical schema blocks on the same page can confuse Google. If your CMS plugin and your theme both add Product schema, you may end up with conflicting data.
  • Forgetting to update schema after content changes: If you change prices, business hours, or contact info, update the schema too. Stale schema data creates trust issues with search engines.
  • 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:

  • ✅ Schema type matches the page content (Product, Article, LocalBusiness, etc.)
  • ✅ All required properties are included for your schema type
  • ✅ Schema data accurately reflects visible page content
  • ✅ JSON-LD format (not Microdata or RDFa)
  • ✅ Validated with Google's Rich Results Test — zero errors
  • ✅ No duplicate/conflicting schema blocks on the same page
  • ✅ BreadcrumbList schema on all internal pages
  • ✅ Organization/LocalBusiness schema on the homepage
  • ✅ Monitoring set up in Google Search Console Enhancements reports
  • ✅ Schema maintained when content changes (prices, hours, availability)
  • 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:

  • How to Write the Perfect Title Tag for SEO — Your title tag appears alongside rich results, making both essential for maximising clicks.
  • How to Write a Meta Description That Gets Clicks — The description text below your title and rich result that drives the final click decision.
  • How to Fix Missing Open Graph Tags — Control how your pages appear on social media, complementing schema for search.
  • How to Fix Missing Alt Text on Images — Image SEO pairs with structured data to maximise visual search visibility.
  • What Is a Good SEO Score? — Understand how structured data factors into your overall SEO health score.
  • 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.

    → Get your free SEO Report Card

    Related guides

    Related Tools