Skip to content
All articles

Blog

Schema markup: a plain guide to JSON-LD, with examples for every common page

What schema markup is, which schema types a normal website needs, copy-ready JSON-LD examples, how to add it on WordPress, Shopify or custom code, how to test it, and what it does for Google and AI search.

Last updated

Schema markup is a small block of code, usually JSON-LD, that tells search engines and AI tools in plain facts what a page is: a business with this address, an article by this author, a product at this price. Most websites need only five or six types. Add them with the free schema markup generator, paste the code into the page, and test it with Google's Rich Results Test.

What schema markup does, and what it doesn't

Schema uses the shared vocabulary at schema.org, which Google, Bing and other search engines read. Correct markup can make a page eligible for rich results, such as product prices and stock, event dates, breadcrumbs instead of a raw URL, or your site name above the result. It also connects the pieces of your site: this logo, these social profiles and this address all belong to one organization.

It is not a ranking shortcut. Google has said structured data is not a general ranking signal, and eligibility for a rich result is not a promise to show one. Two changes matter in practice: since 2023, Google shows FAQ rich results only for a small set of well-known government and health sites, and HowTo rich results are gone. FAQ markup is still valid and still useful to other systems, but don't add it expecting the old dropdowns in Google.

The schema types most websites need

TypeWhere it goesWhat it can do
OrganizationHomepage (or About page)Names your brand, logo and official profiles, so search engines and AI tools know which entity the site belongs to.
LocalBusiness (or Plumber, Dentist…)Homepage or contact page, one per location pageAddress, phone, opening hours and area. See the LocalBusiness schema guide.
WebSiteHomepage onlyThe site name Google shows above your results.
BreadcrumbListEvery page below the homepageA readable path in results instead of the URL.
ArticleBlog posts and guidesHeadline, author and dates, which help with freshness and trust.
ProductProduct pagesPrice, currency and availability can appear in results.
ServiceService pagesThe service, the provider and the area served.
FAQPagePages with a visible list of questionsClear question and answer pairs. See FAQ schema in 2026.
Event, Person, SoftwareApplicationEvent pages, author pages, app pagesDates and venue, author expertise, app category and price.

A copy-ready example

This is Organization and WebSite markup for a homepage. Replace every value with your own. The generator builds the same code from a form for all of the types above.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@graph": [
    {
      "@type": "Organization",
      "@id": "https://example.com/#organization",
      "name": "Example Co",
      "url": "https://example.com/",
      "logo": "https://example.com/logo.png",
      "sameAs": [
        "https://www.linkedin.com/company/example-co",
        "https://www.facebook.com/exampleco"
      ]
    },
    {
      "@type": "WebSite",
      "@id": "https://example.com/#website",
      "name": "Example Co",
      "url": "https://example.com/",
      "publisher": { "@id": "https://example.com/#organization" }
    }
  ]
}
</script>

The @graph holds several items in one block, and @id lets them point at each other, so the website is clearly published by that organization.

How to add schema markup

  • WordPress: SEO plugins add Organization, WebSite, BreadcrumbList and Article markup for you. Check their settings first, then add any missing type with a header and footer code plugin, on the pages it belongs to.
  • Shopify: most themes already output Product markup. Check a product page before adding more, because two Product blocks with different prices confuse search engines. Add Organization markup in the theme's layout file or with an app.
  • Custom code or a site builder: paste the script tag into the page's head or body. In frameworks such as Next.js, render it as a script tag of type application/ld+json from the page component, built from the same data the page shows.

How to test it

  1. Run the page through Google's Rich Results Test. It shows which rich results the page is eligible for, and errors that block them.
  2. Run it through the Schema Markup Validator at validator.schema.org for types Google doesn't use for rich results.
  3. After a few days, check the Enhancements reports in Google Search Console for errors across the whole site.

Mistakes to avoid

  • Marking up what isn't on the page. Ratings, prices, questions and opening hours in the markup must match what visitors see. Google can ignore markup that doesn't match, or take manual action for spammy markup.
  • Fake or self-written reviews. Review stars for your own business on your own site are not shown by Google, and invented ratings break its guidelines.
  • Duplicate blocks. A plugin, a theme and a hand-added block can each output Organization or Product markup. Keep one.
  • Broken JSON. One missing comma makes the whole block unreadable. The free SEO, AEO and GEO checker flags JSON-LD that doesn't parse.
  • Different facts in different places. The name, address and phone in your markup should match your Google Business Profile and directory listings.

Schema markup and AI search

AI assistants and AI search features read pages too. Markup that clearly names the organization, the author of an article and the answers on a page makes those facts easier to pick up, which is why Organization markup, author details and visible question and answer sections are among the AI search readiness checks Sonnetpilot runs. It is one part of being easy to cite, next to answering questions directly and letting AI crawlers in. No markup guarantees a mention, so treat any tool that promises one with care.

To see whether AI answers already name your brand, try the AI visibility checker. Inside Sonnetpilot, every audit checks the structured data on each page and can add missing markup through your website connection after you approve it.

Frequently asked questions

What is schema markup?

Schema markup is structured data, usually a JSON-LD script in a page's HTML, that describes the page in the shared schema.org vocabulary: this is a business with this address, this is an article by this author, this is a product at this price.

Does schema markup improve rankings?

Not directly. Google has said structured data is not a general ranking factor. It makes pages eligible for rich results, which can earn more clicks, and it removes doubt about what a page is and who is behind it.

Which schema types does a small business website need?

Organization (or a specific LocalBusiness type) and WebSite on the homepage, BreadcrumbList on inner pages, Article on blog posts, Product on product pages and Service on service pages. That covers most sites.

Is JSON-LD better than microdata?

Google supports JSON-LD, microdata and RDFa, and recommends JSON-LD because it sits in one script block, separate from the visible HTML, so it is easier to add and maintain.

Does schema help with AI search?

It helps AI tools identify your organization, authors and products from clean facts, and it is part of being easy to cite. No markup guarantees that an AI answer will mention or cite you.

Bring your website. We'll show you what to fix first.

Type your website and see its SEO, AEO and GEO scores in 10 seconds, no account needed. Then get a free audit of up to 25 pages. No credit card required.