How to Add Schema Markup to Your Website (Step by Step)
schema nov 27, 2026

How to Add Schema Markup to Your Website (Step by Step)

Add schema markup with JSON-LD: pick the right types, copy a full LocalBusiness example, place it on WordPress, Shopify, Wix, or Squarespace, and validate it.

/blog/how-to-add-schema-markup-to-your-website

Header image: a page, a JSON-LD block, and a listing that can show the same hours. The listing is an illustration of what Google can show. Graphic: Ctrl Alt Orion.

Schema markup is a block of code that names the facts already on a page: this is a bakery, this is the address, these are the hours. You add it as JSON-LD, either by pasting a <script type="application/ld+json"> block or by letting the site builder write one. This guide walks through the sequence: pick the types, write one complete local-business block, place it on WordPress, Shopify, Squarespace, or Wix, then validate it.

A valid test makes a richer Google listing possible. Google’s general structured data guidelines say it does not make that listing certain. The algorithm can still show a plain result. For the background on which types still change a Google listing, and which ones no longer do, read what schema markup is and which types help a local business first.

Step 1: Choose the schema types that match your pages

Markup earns a place when it describes something a person can see on that page. Google’s quality guidelines say the structured data has to be a true representation of the page, and the local business guide says to put LocalBusiness on a page that states the business details. The homepage or the contact page is the usual one.

For a typical small business, start with the pages that already state a fact a searcher might use:

PageSchema typeWhat it can do in Google
Home or contactLocalBusiness, or a tighter subtype such as Bakery, Restaurant, Dentist, or PlumberEligible for local-business details. Google requires name and address.
A page where someone can buyProduct, with an Offer for price and availabilityEligible for product details such as price and availability, when the markup matches Google’s product guide.
A blog postArticle or BlogPostingNames the headline, author, and dates as structured fields.
A page about one eventEventEligible for an event rich result with the date and place that page states.

Two rules from Google’s guides:

  1. Use the most specific type that fits. LocalBusiness is the parent. The local business guide names Restaurant, DaySpa, and HealthClub as the kind of subtype to prefer, and a bakery page can use Bakery. A business that is two things at once uses an array, such as ["Electrician", "Plumber"]. Google does not support additionalType for that.
  2. Fewer accurate types beat a long list. The pages that state a name, a price, a date, or an address are enough.

Two types that used to expand a Google result and no longer do:

  • HowTo. Google stopped showing How-to rich results on September 13, 2023, on desktop and mobile, and removed the HowTo documentation on September 14, 2023.
  • FAQ. FAQ rich results stopped appearing in Google Search on May 7, 2026. Google removed that documentation on June 15, 2026. The earlier limit, from 2023, had already confined them to some government and health sites. The 2026 removal closed that exception.

Plugins still offer both. Old FAQPage or HowTo JSON-LD can stay. Adding either one to earn a dropdown or a step list in Google is wasted work. The questions and the steps can remain on the page as ordinary text. Google’s August 2023 post and the documentation changelog are the records.

Step 2: Write the JSON-LD

Google recommends JSON-LD when the site can support it. It is one <script type="application/ld+json"> element in the head or the body, separate from the sentences a visitor reads. Google can also read JSON-LD that JavaScript inserts, which is how many site builders add it. Microdata and RDFa are supported too. They scatter attributes through the HTML, and a theme update can tear them apart.

This is a complete example for a fictional bakery. name and address are the properties Google requires for a LocalBusiness rich result. The other fields are recommended when they are true and visible on the page. Replace every value. The name, street, and hours below are made up.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Bakery",
  "@id": "https://www.examplebakery.com/#business",
  "name": "Example Bakery",
  "description": "Artisan breads, pastries, and custom cakes in Columbus, Ohio.",
  "url": "https://www.examplebakery.com",
  "telephone": "+1-614-555-0142",
  "priceRange": "$$",
  "image": "https://www.examplebakery.com/photos/storefront.jpg",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "1421 High St",
    "addressLocality": "Columbus",
    "addressRegion": "OH",
    "postalCode": "43201",
    "addressCountry": "US"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 39.99351,
    "longitude": -82.99672
  },
  "openingHoursSpecification": [
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"],
      "opens": "07:00",
      "closes": "18:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": "Saturday",
      "opens": "08:00",
      "closes": "14:00"
    },
    {
      "@type": "OpeningHoursSpecification",
      "dayOfWeek": "Sunday",
      "opens": "00:00",
      "closes": "00:00"
    }
  ],
  "sameAs": [
    "https://www.facebook.com/examplebakery",
    "https://www.instagram.com/examplebakery"
  ]
}
</script>

What each piece is doing:

  • @context and @type tell the parser this is Schema.org data and which type it is. Use Bakery, Plumber, or whichever subtype fits. LocalBusiness is the fallback when nothing tighter exists.
  • name and address are required for Google’s local-business result. Keep the street in streetAddress, the city in addressLocality, the state in addressRegion, and the ZIP in postalCode. The whole address jammed into one field is harder for Google to use.
  • @id is a stable identifier, so markup on another page can point at this business. Google’s guidelines use @id when two items on a page refer to the same thing. It is optional for LocalBusiness.
  • geo is latitude and longitude as plain numbers. Google asks for at least five decimal places on each. In Google Maps, right-click the location and read the coordinates from the menu that opens. The example above has five.
  • telephone should include the country code and the area code. +1-614-555-0142 is the shape. The number in the example is fictional.
  • priceRange is short text: dollar signs ($$) or a range such as $10-15. Google will not show a price range when the value is 100 characters or longer.
  • openingHoursSpecification is the hours field Google documents. The examples on the local business page use 24-hour times such as "18:00" for 6 p.m. The property table also lists hh:mm:ss. Copy the examples. A day you are closed is opens and closes both set to "00:00", which is what the Sunday block above does. Leaving Sunday out does not tell Google the shop is closed. A day you are open 24 hours is "00:00" to "23:59". Hours that pass midnight stay in one specification: Saturday opens at "18:00" and closes at "03:00". A seasonal closure adds validFrom and validThrough. Google accepts full day URLs (https://schema.org/Monday) and the short names (Monday).
  • sameAs lists profiles that are actually yours, such as Facebook or Instagram. Google’s introduction says it can use sameAs beyond the properties in a single feature guide. Skip profiles you do not control.
  • image should be a photo of that business, on a URL Google can fetch. It is part of Google’s full example. It is not in the required pair of name and address.

For a product page, follow the product guide. The useful core is Product with name and image, plus offers containing price, priceCurrency, and availability when the page is where a customer buys. aggregateRating belongs only when the reviews are real and visible on that page. The next section’s review rules are the hard stop.

The visible page and the JSON-LD have to name the same business, street, and hours Name, street, and hours are the fields that have to match. A closed Sunday is written as 00:00 to 00:00. Diagram: Ctrl Alt Orion.

advertisement

Step 3: Place the markup on your platform

Read the page source before you paste anything. Search for application/ld+json. A second copy of the same type gives Google two versions, and the two versions drift. Google’s introduction points people at the CMS tool for this reason: a hand-edited block is easy to lose on the next theme update.

WordPress

Use the plugin when it already covers the type. Yoast SEO and Rank Math both write JSON-LD.

On Yoast’s structured-data feature page, Organization, WebSite, Article, and BlogPosting are in the free plugin. LocalBusiness, which is the block with the address and the hours, is listed under Yoast SEO Premium and Yoast WooCommerce SEO. Set the business name, logo, and social profiles in Yoast’s site representation settings, then check that page again before you pay. Yoast moves features between plans.

Rank Math’s Schema Generator sits on the post or page editor. Its schema documentation includes Local SEO schema in the free plugin. Multiple locations are a Rank Math PRO feature. Use the knowledge base to confirm the free list still matches what you need, because the generator’s types change.

Paste it yourself when the plugin does not cover the page. A Custom HTML block in the page body is enough for one page. Google reads JSON-LD in the head or the body.

For a site-wide block on a classic theme, put the script in a child theme’s header.php, just before </head>, so a parent-theme update does not erase it. The editor is under Appearance, Theme File Editor. Many current block themes have no header.php to edit. On those, a snippet plugin that injects a site-wide header is the practical route. Edit the child theme or the snippet, and leave the parent theme files alone.

Shopify

Themes already emit some structured data. Dawn, Shopify’s reference theme, prints {{ product | structured_data }} in the product section. Shopify’s structured_data filter outputs a Product when the product has no variants, and a ProductGroup when it has variants, with an Offer for price, currency, and availability. An article object comes out as Article. Search the theme for structured_data or application/ld+json before you add a second product block.

To add markup the theme does not write, such as the bakery block above:

  1. In the Shopify admin, go to Online Store, then Themes.
  2. Duplicate the theme first. Shopify’s code-editing help says to keep a backup, and it warns that a theme update can drop code edits that the updated copy does not carry.
  3. Open the … menu on the theme and choose Edit code. Shopify only opens that editor after a paid theme is purchased. A trial of a paid theme will not.
  4. For site-wide markup, open layout/theme.liquid and paste the JSON-LD script before </head>. Leave content_for_header where the theme put it. Shopify requires that object inside the head, and the file will not save if the reference is gone.
  5. For product markup, edit the product section. In Dawn that file is sections/main-product.liquid. Product variables are not available on every template, so a product block in theme.liquid fails on pages that are not products. File names differ by theme. Search for the existing structured_data line and extend that output, or replace it, so the page has one product block.

If you would rather not edit Liquid, search the Shopify App Store for a structured-data app and read what it injects. After it is installed, view the page source and confirm you still have one copy of each type.

Squarespace

Squarespace already generates structured data, and you cannot edit or remove those blocks. Its help page on how Squarespace handles search, updated July 13, 2026, lists blog post, event, local business, organization, product, and website. View the source before you add another LocalBusiness or Product on top of the one Squarespace emits.

Extra JSON-LD goes through Code Injection. The code injection guide, updated September 16, 2026, says the feature is on the Core, Plus, and Advanced plans, plus some legacy plans. The current plan comparison, updated October 28, 2026, includes code injection starting at Core. The Basic plan does not have it. Checkout pages do not accept custom code.

Site-wide markup: open the Pages panel, click Custom Code at the bottom, then Code Injection. On a version 7.0 site, open Website Tools first, then Code Injection. The Pages panel guide, updated July 29, 2026, is the map. Paste the script into the Header field. That field is injected into the <head> of every page. Save.

One page: in the Pages panel, hover the page, open its settings, choose Advanced, and paste into Page Header Code Injection. That lands in that page’s head. On version 7.1, Squarespace says ordinary HTML in that field can disappear when header transparency is turned off, so keep the field to the JSON-LD script. Page code injection does not appear on index landing pages.

Wix

Wix has a structured-data field, and several page types already carry preset markup. The adding structured data article says Wix Stores product pages, Wix Bookings services, Wix Blog posts, and Wix Events pages ship with markup. Check those in SEO settings before you add a second copy. Wix also says that adding markup does not guarantee a rich result.

To add your own block on a page in the Wix Editor:

  1. Open the editor.
  2. Click Pages & Menu.
  3. Click the More Actions icon next to the page.
  4. Click SEO Basics, then the Advanced SEO tab.
  5. Click Structured Data Markup, then +Add New Markup.
  6. Paste the JSON-LD and click Apply.

In the Studio Editor the same path starts at Pages instead of Pages & Menu.

Wix’s limits, from that article and its troubleshooting page: JSON-LD only, each markup under 7,000 characters, and up to five markups on a page. The troubleshooting page also caps a page at 8,000 characters of markup in total, expects one <script type="application/ld+json"> wrapper per block, wants straight quotes, and rejects a line break inside a field value. Keep each "key": "value" on a single line. A pretty-printed value that wraps will fail Wix’s check even when the JSON is otherwise valid.

Dynamic item pages have their own structured-data settings. Wix’s dynamic-page SEO guide puts structured data markup in the SEO dashboard for that page type, and collection variables can fill the fields. Use that screen for a CMS item page. The editor path above is for a page you open in Pages & Menu.

Wix’s help still mentions FAQ rich results as something search engines might build. Google stopped showing those on May 7, 2026, so an FAQ block in Wix will not bring the old dropdown back.

A plain HTML site

Paste the <script type="application/ld+json"> block in the <head>, or before </body>. Upload, then view the live source and search for application/ld+json to confirm the block arrived whole.

Step 4: Validate before you rely on it

Broken JSON-LD is ignored. Google will not email you about a trailing comma. Two free tools answer two different questions.

  1. Google Rich Results Test. Paste the URL or the raw code. It reports whether the page is eligible for a Google rich result, and it separates critical errors from non-critical issues. Google’s guides say to fix the critical errors. Non-critical issues are recommended properties. Fill them when the page really has that fact. They are not required for eligibility. A LocalBusiness block with name and address is what the local business guide tells you to run through this test.
  2. Schema Markup Validator. This checks the block against Schema.org, including syntax and property names the Rich Results Test does not grade. A trailing comma, a curly quote pasted from a word processor, or a misspelled property shows up here. Google’s introduction says to treat Google’s own docs as the rulebook for Google Search, and Schema.org as the wider vocabulary. Use the validator for “is this valid JSON-LD,” and the Rich Results Test for “would Google consider this a rich result.”

A type Google no longer uses as a rich result can be valid Schema.org and still show nothing in the Rich Results Test. That is the expected outcome for FAQPage and HowTo. A LocalBusiness missing name or address is a different outcome: it is not eligible, and the Rich Results Test should say so.

Step 5: Check Search Console after Google recrawls

Google’s local business guide says to publish the page, then use URL Inspection to see what Google fetched. Recrawling can take several days. A valid test today is not a richer listing tomorrow.

Where the reports sit, from Search Console’s rich result report overview:

  • Enhancements, in the left navigation, lists a report only after Google has found valid markup of a supported type on the property. The current list includes breadcrumbs, events, and review snippets, among others. It does not include FAQ, How-to, or a Local business report.
  • Shopping is where product snippets and merchant listings are reported.
  • A missing Enhancements section usually means Google has not found a supported type yet. Article markup on its own does not open that section.

Open the URL in URL Inspection to see which enhancements Google detected on that page, including warnings on the detected items. Request indexing from that screen asks Google to recrawl. It still waits in the crawl queue.

Each rich-result report charts valid items and invalid items. Critical issues are what keep an item from being eligible. Non-critical issues are listed separately, as ways the item could be more complete. The counts are a sample of items, not a census of every URL.

Keep the markup honest

These are the ways a technically valid block still fails.

The code has to match the page. Google’s quality guidelines forbid markup for content a reader cannot see, and markup that misleads. Hours in the JSON-LD that disagree with the footer are the common case. A structured-data manual action removes eligibility for rich results. It does not change how the page ranks in Google web search. The Manual actions report in Search Console is where that shows up. When the hours change, change the footer and openingHoursSpecification the same day.

Reviews of your own business do not get stars. Google’s review-snippet guidelines, updated September 8, 2026, say that if the business being reviewed controls the reviews about itself, pages that use LocalBusiness or any Organization type are ineligible for the star feature. That includes reviews written on the business’s own site and a widget that embeds Google or Facebook reviews. The review text, or the aggregate rating, has to be visible on the page. Google also says not to aggregate ratings copied from other websites, and not to mark up fake reviews or paid reviews that hide the payment. Stars on a map listing usually come from Google’s own review system. The explainer linked at the top goes further on that split. aggregateRating on a product you sell is a different case, and only when those reviews are on the product page and follow the same review rules.

Syntax is unforgiving. A trailing comma before }, a missing quote, or a curly quote breaks the whole block. The Schema Markup Validator catches it. Fix the error, then retest. A warning about a recommended field such as image is worth filling when you have the photo, and it is not the same as a critical error.

Two copies will disagree. If an SEO plugin already writes Article and you paste a second Article block, Google reads both. View source, search for application/ld+json, and add a type only when it is missing.

A Google Business Profile is a separate system. The JSON-LD does not create the profile you manage in Google, and it does not edit one. For most shops with a street address, a claimed profile with current hours still does more for map results than this block does. Make the profile, the page, and the JSON-LD agree, then leave them that way.

A short workflow

  1. Pick the types that match pages a customer actually uses. Skip FAQPage and HowTo when the goal is a Google feature.
  2. Write JSON-LD from the example. Use the specific @type. Set a closed day to "00:00" and "00:00". Give coordinates at least five decimal places.
  3. Read the page source. Add the block through the plugin, code injection, or the theme file. Keep a single copy of each type.
  4. Run the Rich Results Test and the Schema Markup Validator. Fix every critical error.
  5. After the page is live, open URL Inspection, request indexing, and check Enhancements or Shopping once Google has recrawled. Allow several days.

Most of the time goes into the hours and the coordinates. The script tag is the short part. The part that keeps working is changing the page and the JSON-LD on the same day a fact changes.

Sources

24 refs
  1. Google: Intro to structured datadevelopers.google.com
  2. Google: Local business structured data (page updated September 8, 2026)developers.google.com
  3. Google: General structured data guidelinesdevelopers.google.com
  4. Google: Review snippet guidelines, including self-serving reviewsdevelopers.google.com
  5. Google: Product structured datadevelopers.google.com
  6. Google: Event structured datadevelopers.google.com
  7. Google Search Central: HowTo and FAQ changes, August and September 2023developers.google.com
  8. Google Search documentation updates, including the May 8 and June 15, 2026 FAQ entriesdevelopers.google.com
  9. Schema.org: Bakeryschema.org
  10. Google Rich Results Testsearch.google.com
  11. Schema Markup Validatorvalidator.schema.org
  12. Search Console: Rich result reportssupport.google.com
  13. Yoast: Structured data features, including which types are in the free pluginyoast.com
  14. Rank Math: Schema types in the free plugin and in PROrankmath.com
  15. Rank Math: Local SEO, including multiple locations in PROrankmath.com
  16. Shopify: Edit theme codehelp.shopify.com
  17. Shopify: structured_data Liquid filtershopify.dev
  18. Squarespace: Code injection, plans and placementsupport.squarespace.com
  19. Squarespace: Built-in structured datasupport.squarespace.com
  20. Squarespace: The Pages panel, including Custom Codesupport.squarespace.com
  21. Squarespace: Basic, Core, Plus, and Advanced planssupport.squarespace.com
  22. Wix: Add structured data markupsupport.wix.com
  23. Wix: Troubleshoot structured data markupsupport.wix.com
  24. Wix: SEO settings for dynamic pagessupport.wix.com

← All articles

comments

loading comments…

^ consulting ⌥ building ⌘ shipping