Technical SEO

How to add structured data to a page

Write a JSON-LD block describing what the page is, put it in a script tag, link the nodes with @id references, and validate with both the Schema Markup Validator and the Rich Results Test. They answer different questions.

Written by Anas Bin Masud 7 steps About 1 hour 265 words

Before you start

  • Access to the page templates
  • Schema.org documentation for the type you need

The steps

  1. Step 1: Choose the accurate type

    Service, Product, Article, LocalBusiness — whatever the page genuinely is. Do not pick a type for the rich result it might earn.

  2. Step 2: Write one @graph block

    A single script tag with all nodes in one array, rather than several unrelated blocks.

  3. Step 3: Give every node an @id

    Absolute URLs with a fragment, such as https://example.com/#organization.

  4. Step 4: Link the nodes

    Reference other nodes as bare { "@id": "..." } objects — founder, publisher, isPartOf, about.

  5. Step 5: Check every value is accurate

    Prices and availability must match the visible page. Emails are Text, not mailto:. Phone numbers are E.164.

  6. Step 6: Validate twice

    Schema Markup Validator for correctness against schema.org, Rich Results Test for Google eligibility.

  7. Step 7: Confirm in the built output

    Not in your template. Check the deployed HTML.

The mistake that makes it worthless

Unlinked islands. An Organization node and a Person node that never reference each other are two unrelated assertions. Joined by founder and worksFor, they describe a business with a human in it — which is what you meant to say.

What risks a penalty

Review or AggregateRating markup for reviews that are not visible on the page, or that you wrote. It is the most commonly penalised structured-data violation, and the correct response to having no reviews is no rating markup at all.

The background behind this

Schema markup that does something, and the kind that risks a penalty covers the reasoning in about 3 minutes — free, ungated, written from client work.

Who wrote this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada, Ireland and Pakistan. These procedures are the ones I run on client work, written down rather than invented — including the ones where the honest answer is that the fix is not available on your current hosting.

Related procedures

All 64 how-to guides →

Want this done rather than done yourself?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab