Adding schema markup follows the same order on every platform. Choose the schema.org type that describes the page, gather the facts that appear on that page, write them as JSON-LD, place the block in your template or platform field, publish, then test the live URL and look at it in Search Console.

Schema.org is the shared vocabulary of types and properties that search engines read, and JSON-LD is a way of writing those facts as a small block of data inside a script element. Google says it recommends JSON-LD because it is easier to maintain than Microdata or RDFa (Google structured data guidelines).

Before you add anything, look at what your theme, plugin or app already outputs. Many platforms write some markup on their own, and a second description of the same page is worse than one good one.

Key takeaways

  1. Follow the same orderChoose the page's schema.org type, gather facts visible on that page, write JSON-LD, place it, publish, then test the live URL.
  2. Use only visible factsGoogle says markup must describe visible content. If the page has no reviews, the markup has none, and any price must match the one shown.
  3. Check existing output firstSearch the live page's HTML for application/ld+json. If a theme, plugin or app already describes the entity, edit that block instead of adding a second.
  4. Place the block per platformWordPress, Shopify, Wix, Squarespace, Webflow and hand-built sites each put the code in a different place. Match menu names and plan limits to what your account shows.
  5. Test the published pageUse the Rich Results Test for Google features and the Schema Markup Validator for vocabulary, then use URL Inspection. A pass does not guarantee a rich result.
  6. Keep the markup currentTest again after any page or template edit, because prices, availability, authors and dates go stale when the page changes and the block does not.

The steps in order

  1. Choose the page and the main schema type that describes it.
  2. Read Google's documentation for the feature that matches that type, if you want Google's feature requirements met.
  3. Gather the facts that appear on the page: name, author, dates, images, price, address.
  4. Write the JSON-LD, or generate it, inside a script element.
  5. Place the block in the template, platform field, plugin, app or server-rendered output.
  6. Publish the page.
  7. Test the live URL, then inspect it in Search Console and in Bing Webmaster Tools.
  8. Watch the reports and update the markup when the page changes.

Choose the type that matches the page

Start with one page and ask what it is. An editorial page suits Article or BlogPosting. A page about one product suits Product. A physical business suits LocalBusiness, ideally the most specific subtype that applies. A company's home or about page suits Organization. Other common choices are Event for an event page, Recipe for a recipe, and BreadcrumbList for breadcrumb trails.

If you are unsure which type fits, the types of schema markup guide walks through the common ones. If the term itself is new, what schema markup is gives a plain definition with a worked example.

An entity is simply the thing being described, such as the article, the product or the business. Choose a type that describes the page the reader is looking at. A category page listing forty products is not one Product, and an article about a recipe is not a Recipe unless the page is the recipe.

Then read the Google feature documentation for your type. Google's required properties decide eligibility for a Google rich result, and schema.org defines more properties than any one Google feature uses. A property can be valid schema.org vocabulary and still do nothing for a particular Google feature, which is not an error.

Collect the facts that appear on the page

Open the page in a browser and write down what a reader can see: the headline, author name, publication date, main image, price, availability, address or opening hours, depending on the type. These become the values in your markup.

Google says markup must describe content that is visible on the page, and that it should not mark up information readers cannot see (Google structured data guidelines). That applies to prices, ratings, reviews, authors and dates. If the page shows a price of 12.00, the markup says 12.00. If the page has no reviews, the markup has no reviews.

Collecting facts first also tells you which properties you can fill with true values. Leave out a recommended property you have no true value for rather than guessing one. An empty optional field costs you nothing, while an invented value can cost you the markup's trustworthiness.

Image URLs deserve a quick check at this stage. They need to be reachable by crawlers, so a link that sits behind a login or is blocked by robots.txt will not help. Google asks for images that represent the article or product, and it accepts several crops of the same image.

Write the JSON-LD

Every block has the same wrapper: a script element with type="application/ld+json", a @context of https://schema.org, and a @type. Everything else is properties. The two examples below use fictional names on example.com. Replace every value with facts from your own page, and keep the markup in sync with what readers see.

The Article example includes the properties Google recommends for Article markup. Google lists no required properties for that feature; it recommends headline, image, author, datePublished and dateModified, and publisher is optional. Change the @id, url, headline, description, image URLs, author, publisher and both dates. Add a timezone offset to the dates as shown, and update dateModified only when you actually edit the page (Google Article structured data).

html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "@id": "https://example.com/blog/how-to-bake-sourdough#article",
  "url": "https://example.com/blog/how-to-bake-sourdough",
  "headline": "How to Bake Sourdough Bread at Home",
  "description": "A practical guide to baking a simple sourdough loaf at home.",
  "image": [
    "https://example.com/images/sourdough-1x1.jpg",
    "https://example.com/images/sourdough-4x3.jpg",
    "https://example.com/images/sourdough-16x9.jpg"
  ],
  "author": {
    "@type": "Organization",
    "name": "Example Bakery",
    "url": "https://example.com/about"
  },
  "publisher": {
    "@type": "Organization",
    "name": "Example Bakery",
    "url": "https://example.com",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/images/example-bakery-logo.png"
    }
  },
  "datePublished": "2026-05-04T09:00:00-05:00",
  "dateModified": "2026-05-18T10:30:00-05:00",
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "https://example.com/blog/how-to-bake-sourdough"
  }
}
</script>

The author can be a Person or an Organization, whichever the page actually shows as the author. If you would rather fill in a form than edit braces, the Article schema generator builds this block from the same fields.

For a product page, the Product example below follows Google's product snippet documentation. A Product snippet needs name plus at least one of offers, review or aggregateRating. When you use offers, the price is required, and priceCurrency and availability are recommended (Google Product structured data). Replace the product name, SKU, brand, price, currency, availability and URLs with your own.

html
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "@id": "https://example.com/products/example-sourdough-starter#product",
  "url": "https://example.com/products/example-sourdough-starter",
  "name": "Example Sourdough Starter",
  "description": "A fictional bakery starter culture for home bread making.",
  "image": [
    "https://example.com/images/example-sourdough-starter-1x1.jpg",
    "https://example.com/images/example-sourdough-starter-4x3.jpg",
    "https://example.com/images/example-sourdough-starter-16x9.jpg"
  ],
  "brand": {
    "@type": "Brand",
    "name": "Example Bakery"
  },
  "sku": "EXAMPLE-STARTER-001",
  "offers": {
    "@type": "Offer",
    "url": "https://example.com/products/example-sourdough-starter",
    "price": 12.00,
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock"
  }
}
</script>

This example has no ratings or reviews on purpose. Add review or aggregateRating only when genuine reviews are visible on the page and Google's guidelines allow them. The Product schema generator covers the same fields, and the JSON-LD schema examples guide has more complete blocks to copy for other types.

If you are choosing between JSON-LD, Microdata and RDFa, the format comparison lays out the differences. Bing Webmaster Tools says Bing supports all three, so the JSON-LD route works for Bing as well (Bing Webmaster Tools, marking up your site).

Check what your site already outputs

Before you place a block, find out whether one already exists for the page. Open the live page, view its HTML, and search for application/ld+json. A theme, SEO plugin, store app or the platform itself may already describe the article, product, organization or website.

If a block for the same entity already exists, edit that one or choose a single primary source for it. Two Product blocks with different prices, or two Organization blocks with different names, send conflicting facts about one page. Adding a second block is appropriate when it describes a distinct, accurate entity that the first one leaves out.

Small colored data blocks slide into empty slots on a simple page card against a dark blue background.
Figure 1. Each fact from the page has one slot in the markup, and one place on the platform where the block lives.

Once you know what is already there, decide where the new markup lives. A theme or template suits repeated page types such as posts or products, and one change reaches every page of that type, which is also why a mistake there reaches them all. A plugin or app suits platforms with a maintained integration. A custom-code field suits page-specific markup. Static HTML suits a hand-coded site, though it has to be kept current by hand.

Place the block on your platform

Each platform puts the code in a different place, and each has limits on what its editor accepts. Menu names and plan restrictions change, so match them to what you see in your account.

WordPress

Use a maintained SEO plugin or a theme template as the main route, especially for site-wide markup. For one page, add the JSON-LD to a Custom HTML block, publish, and inspect the live page. WordPress documentation says script tags can be removed for users without the unfiltered_html capability, so an editor account may lose the script element on save (WordPress Custom HTML documentation). The WordPress schema markup guide goes further into plugins, child themes and snippets.

Shopify

Start with the theme editor, an app or a theme integration. If you edit code directly, go to Online Store, then Themes, then Edit code, and duplicate the theme first so you have a backup. Add the markup to the relevant Liquid template, and keep a note of the change. Shopify says theme updates can remove custom code, so test the page again after any update (Shopify: editing theme code). Apps and Custom Liquid sections are another route (Shopify: apps and Custom Liquid).

Wix

Open the page's SEO settings, choose Advanced SEO, open Structured Data Markup, and select Add New Markup. Paste the JSON-LD into the field, give it a name and apply it. Wix also adds preset markup automatically to some product and blog pages, so check for an existing block before you add another (Wix: SEO panel settings).

Squarespace

Squarespace says it generates structured data automatically for supported content such as blog posts, events, local businesses, organizations, products and websites. Treat that generated markup as your starting point, and avoid a second block for the same entity unless the custom markup describes something distinct and accurate (Squarespace: how it optimizes your site for search). For any manual block, follow Squarespace's current code-injection documentation for your account and plan.

Webflow

Use Site settings, then Custom code, for markup that belongs on every page, or Page settings, then Custom code, for one page. Script tags can go in the head or before the closing body tag. Save and publish before you test, because the live page is what gets tested. Webflow describes custom code as an advanced change and says it does not guarantee compatibility or troubleshoot it (Webflow: custom code in head and body tags).

Hand-built sites and Next.js

On a hand-coded site, put the complete script element in the page's head or body and use the page's real canonical URL and visible facts. After you deploy, test the live address rather than a local file.

In a Next.js app, render the JSON-LD in layout.js or page.js. The Next.js documentation notes that serialized values should be sanitized, because untrusted text inside a script element can break out of it (Next.js JSON-LD guide). Replacing the less-than sign with its Unicode escape is the documented approach.

js
export default function Page() {
  const jsonLd = {
    '@context': 'https://schema.org',
    '@type': 'Article',
    headline: 'How to Bake Sourdough Bread at Home',
  }

  return (
    <script
      type="application/ld+json"
      dangerouslySetInnerHTML={{
        __html: JSON.stringify(jsonLd).replace(/</g, '\\u003c'),
      }}
    />
  )
}

Fill the object from your page data and add the remaining properties for your type, as in the Article example above.

Two similar page cards overlap and merge into one card marked with a small check shape.
Figure 2. Two blocks describing the same entity should become one before you test the page.

Tag Manager and JavaScript-added markup

When you cannot reach the templates, Google Tag Manager is an option. Create a Custom HTML tag that holds the JSON-LD, publish the container, and test the live URL. Where you can, use Tag Manager variables that read facts from the page instead of retyping them, so the markup follows the page when it changes. Consent settings and tag timing can both affect whether the block appears, so test with them in mind.

Google says it can process JSON-LD that is present in the rendered DOM, which means markup added by JavaScript can be read (Google: generate structured data with JavaScript). The rendered DOM is the page's structure after a browser or crawler has run its scripts.

For fast-changing facts, server-rendered output is the safer choice. Server-rendered means the HTML is generated before it is sent to the browser. Google warns that Product markup generated with JavaScript can make Shopping crawls less frequent and less reliable for price and availability that change often (Google Product structured data).

Test the live page

Publish first, then test the live URL, because a test of a draft or a pasted snippet does not prove the published page carries the block. Three Google tools answer three different questions, and a Bing tool covers Bing.

Use Google's Rich Results Test to check the page against the requirements of the Google features it supports. Use the Schema Markup Validator when you want general schema.org validation beyond Google's features, since it does not apply Google-specific rich result rules. For a quick pass over a URL or pasted code, the Schema Nova schema checker reads the markup, and the schema validator checks it against the vocabulary.

Then use URL Inspection in Search Console to see how Google indexed the page, which enhancements it detected, and any errors or warnings (Google: monitoring structured data with Search Console).

Bing has its own route. Bing Webmaster Tools says Bing supports JSON-LD, Microdata and RDFa, and its URL Inspection tool has a Markup card that shows the markup Bing read from the page. Bing also says it does not guarantee that markup will be displayed (Bing Webmaster Tools, URL Inspection).

A passing test says the markup parses and meets the checks the tool applies. It does not say a rich result will appear. Google says it does not guarantee a rich result even when markup passes the Rich Results Test, because content, quality, relevance and feature rules also matter.

Keep the markup current

Markup goes stale when the page changes and the block does not. Prices, availability, authors, dates and business details are the usual offenders. After you edit a page or a template, test the live URL again.

In Search Console, the enhancement reports show markup errors and warnings for the types Google reports on. Fix the template or the field they point to, then request a new look at the URL. Expect recrawling and reindexing to take time, and refresh your sitemap when you add or change pages.

If your page does not show the appearance you hoped for, work through the checks in order. Confirm the page is indexable, since a noindex tag, a robots.txt block or a login wall stops the page being used. Confirm the markup is on the live page, matches the visible content and meets the Google feature's required properties. Then confirm the feature still exists, because Google retires some.

Setup steps in order

The same order applies on every platform.

  1. Choose the page typePick the schema.org type that describes this page.
  2. Collect visible factsList what readers can see: names, dates, prices, addresses.
  3. Write or generate JSON-LDPut the facts in a script element with the type application/ld+json.
  4. Place and publishAdd the block in your template, plugin or platform field, then publish.
  5. Test the live URLRun the Rich Results Test, then inspect the URL in Search Console.
  6. Monitor and updateWatch the reports and edit the block when the page changes.

Mistakes that keep markup from working

The most common cause of failed markup is marking up something readers cannot see, or using a price, rating, author or date that differs from the visible page. Adding fabricated or self-serving reviews belongs in the same group.

Type and property choices cause the next set of problems: a type that does not describe the page, a broad type when a more specific one applies, or missing required properties for the Google feature you want. The duplicate-entity problem comes from using a theme, plugin, app and custom code together. Stale prices, inaccessible image URLs and blocked pages round out the list.

Valid syntax alone does not produce a rich result. Structured data can be syntactically valid and still ineligible because of content, quality, relevance or feature-specific rules. If you want more on what markup can and cannot do for search, does schema markup help SEO covers it, and schema markup versus structured data explains how the two terms relate.

What markup can and cannot do

Markup helps search engines understand what a page is about, and it may make a page eligible for a richer search appearance. Write accurate markup for the page and treat any display as a possibility; whether AI systems use schema markup compares what each system says. It does not guarantee rankings, traffic, AI citations or a rich result.

Feature support also changes. Google stopped showing FAQ rich results in May 2026 and removed its FAQ feature documentation in June 2026, although FAQPage remains a valid schema.org type. Google Search Central's August 2023 announcement said HowTo rich results were being retired (Google Search Central blog, changes to HowTo and FAQ rich results). Google's October 2024 post said the sitelinks search box was being removed from November 21, 2024 (Google Search Central blog, farewell sitelinks search box). Pick types for what they describe, and treat a Google display as a bonus.

Questions people ask

What is the easiest way to add schema markup?

Use the route your platform already supports: an SEO plugin on WordPress, the theme editor or an app on Shopify, the Structured Data Markup field on Wix, or the generated markup on Squarespace. Generate the JSON-LD with a form, paste it where the platform allows, and test the live URL.

Can I add schema markup without a plugin?

Yes, wherever you can place a script element. On WordPress that means a Custom HTML block for one page, as long as your account can keep script tags. On Wix, Webflow and hand-built sites, it means the custom-code or structured-data field. Check first for markup that already exists.

Where does JSON-LD go in HTML?

Inside a script element with type="application/ld+json", in the head or the body of the page. Webflow's documentation says either position works, and Google reads JSON-LD wherever it appears in the rendered page. Choose one place and keep a single block per entity.

Can Google read schema markup added with JavaScript?

Google says it can process JSON-LD that is present in the rendered DOM, so markup added by Tag Manager or by page scripts can be read. For prices and availability that change often, Google recommends server-rendered Product markup, because JavaScript-generated markup can make Shopping crawls less reliable.

Does valid schema markup guarantee a rich result?

No. Google says it does not guarantee a rich result even when markup passes the Rich Results Test. Eligibility depends on content, quality, relevance and the rules of the specific feature, and some features have been retired, so check Google's current documentation for yours.

What is the difference between the Rich Results Test and the Schema Markup Validator?

The Rich Results Test checks a page against the requirements of the Google search features it supports. The Schema Markup Validator checks schema.org vocabulary in general and applies no Google-specific rich result rules. Use the first for Google features and the second for everything else.

Quick check

Choose an answer to see feedback. Nothing is scored or saved.

Question 1 of 3

A plugin already outputs Product markup for your page. What is the safest next step?

Question 2 of 3

What does a passing Rich Results Test show?

Question 3 of 3

Which value should you never invent?

Glossary

Select a term to see its definition.

Schema.org. A shared vocabulary for describing entities and properties on web pages.