Guide

How to Add Schema Markup to Your Website

Adding schema markup to your website doesn’t have to be complicated. Whether you’re using a content management system like WordPress or working with a custom-built site, there are methods available at every technical level. The key is knowing which approach suits your setup — and validating your work once it’s in place.

This guide walks you through the most practical ways to implement schema markup, from no-code plugin solutions to manually writing JSON-LD blocks, so you can choose the method that works for you.

Method 1: Use a WordPress SEO plugin

If your website runs on WordPress, the easiest route is an SEO plugin that handles schema automatically. Yoast SEO and Rank Math are the two most popular options. Once installed and configured, these plugins generate schema markup for your pages, posts, and site-wide business information without you needing to write a single line of code.

In Rank Math, for example, you can set your business type, address, and contact details in the plugin settings, and it will output LocalBusiness schema on every relevant page. You can also assign schema types to individual posts — Article, Product, FAQ, and more — from the post editor sidebar.

The main limitation of plugins is that they may not cover every niche schema type you need. For most small businesses, however, the built-in types cover the most valuable use cases. Always check the plugin’s documentation to understand which schema it generates and how to configure it correctly.

Method 2: Add JSON-LD blocks manually

For more control, or if you’re not using WordPress, you can write JSON-LD schema code and add it directly to your website. JSON-LD is the format Google recommends because it sits separately from your visible content, making it easier to manage and update.

A basic LocalBusiness JSON-LD block looks something like this: a script tag with the type “application/ld+json”, followed by a JSON object that specifies your business name, address, phone, URL, and opening hours using Schema.org property names. Google’s structured data documentation provides templates for every major schema type — you simply fill in your own details.

This code is typically added to your page’s HTML head section, either directly in a page template or through your platform’s custom code or header injection settings. If you’re on Shopify, Squarespace, or Wix, look for a section in settings called “custom code” or “header scripts” where you can paste it in.

Validating and monitoring your schema

After adding schema markup, always validate it before assuming it’s working. Google’s Rich Results Test (search.google.com/test/rich-results) lets you enter a URL and see which schema types it detects, along with any warnings or errors. Fix any errors flagged — common mistakes include missing required fields or using incorrect property names.

Schema.org also provides a general validator at validator.schema.org where you can test your JSON-LD code directly. Once your pages are live, Google Search Console’s “Enhancements” section will start reporting on your schema over time, showing you how many pages are eligible for rich results and flagging any issues it encounters at scale.

Schema markup isn’t a set-and-forget task. As your business changes — new address, updated hours, new services — your schema should be updated to match. Review it at least twice a year and whenever significant business details change.

FAQs

Common questions.

Where exactly should I place the JSON-LD script on my page?
Google recommends placing JSON-LD in the head section of your HTML, but it also supports it in the body. For most CMS platforms, placing it in the head (via a header scripts setting) is cleanest. The important thing is that the code is present on the page — Google will find it wherever it appears.
Will adding schema break my website?
No. Schema markup is added in a separate script block that’s invisible to website visitors. It doesn’t affect your page design, layout, or loading speed in any meaningful way. Even if you make a mistake in the code, it simply won’t produce rich results — it won’t cause errors on the visible site.
How long does it take for schema markup to show rich results in Google?
There’s no fixed timeline. Google needs to recrawl and reindex your page after you add schema, which can take anywhere from a few days to a few weeks. Even after indexing, Google decides whether to display rich results based on its own quality criteria, so results aren’t guaranteed — but valid schema always gives you the best chance.
Related guides

More on web design & ux.

Want a hand putting this into practice?

Book a free, no-obligation consultation with a Norwich-based specialist.

Book a free consultation
Get started

Let's put your business in a better light.

Book a free, no-pressure consultation. We'll talk through your goals and tell you honestly what we'd do — whether you work with us or not.

  1. 01
    Tell us a bitFill in the form — two minutes, tops.
  2. 02
    We'll call you backWithin one working day, no pressure.
  3. 03
    Get a clear planHonest advice and a fixed quote.

Free · No obligation · We reply within one working day

Book a free consultation