How to Add Structured Data to Your Website

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.

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.

The most common format is JSON-LD (JavaScript Object Notation for Linked Data), which Google 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>

Schema types relevant to most websites include: LocalBusiness, Product, Article, FAQPage, BreadcrumbList, Review, Event, and WebSite.

Why It Matters for SEO

  • Rich results:: Properly implemented schema can trigger star ratings, FAQ dropdowns, sitelinks, product prices, and more — making your result larger and more visually striking in SERPs.
  • Higher CTR without ranking changes:: Rich results routinely achieve 20–30% higher click-through rates than plain blue links at the same position.
  • 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.
  • E-E-A-T signals:: Schema types like Author, Organization, and Review help Google verify your expertise and trustworthiness.
  • 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.

    How to Fix It

    For HTML/Generic

    Step 1: Choose the right schema type for your page.

    | Page Type | Schema Type |

    |---|---|

    | Homepage / about | Organization or LocalBusiness |

    | Blog post | Article or BlogPosting |

    | Product page | Product |

    | FAQ section | FAQPage |

    | Recipe | Recipe |

    | Event | Event |

    Step 2: Generate your JSON-LD.

    Use Clarity SEO's Schema Generator, or write it manually using the templates below.

    FAQ Schema example:

    <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, depending on the model." } }, { "@type": "Question", "name": "Is the repair covered by warranty?", "acceptedAnswer": { "@type": "Answer", "text": "Yes, all repairs come with a 90-day warranty on parts and labour." } } ] } </script>

    Product schema example:

    <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Product", "name": "iPhone 15 Screen Repair", "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" } } </script>

    Step 3: Add the <script> block to your page's <head> section.

    Step 4: Validate using Google's Rich Results Test.

    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.

    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.

    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".

    For Shopify

    Shopify's default themes include basic Product schema automatically. To add custom schema:

  • 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 }}, "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 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.

    Squarespace: Add JSON-LD via Settings → Advanced → Code Injection (site-wide) or individual page Page Header Code Injection (per-page). Use the Advanced plan or higher.

    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.

    Common Mistakes to Avoid

  • Invalid JSON:: A missing comma or quotation mark breaks the entire schema block. Always validate before publishing.
  • Inaccurate data:: If your Product schema says "In Stock" but the product page says "Sold Out", Google may penalise you for misleading markup.
  • 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.
  • 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.
  • Only implementing on the homepage:: Schema is per-page. Each page should have the appropriate type for its content.
  • 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 enables rich results in Google Search, like star ratings, FAQ dropdowns, and product prices.

    Does structured data improve Google rankings?

    Structured data is not a direct ranking factor, but it enables rich results, which increase click-through rate. Google has also indicated that schema helps with content understanding, which can support 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. Avoid Microdata and RDFa unless your platform specifically requires them.

    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.

    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.

    Summary

    Structured data is one of the highest-leverage SEO tactics available — it costs nothing and can transform how your page appears in search results. Start with the most relevant schema type for your key pages, validate it, 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 Tools