Blog · 7 min read

Structured data and schema markup: a simple guide

Published

Structured data and schema markup: a simple guide

Structured data is a small block of code that tells search engines exactly what a page is about: a product, an article, a business, a recipe or an FAQ. Done well, it can earn richer search listings with ratings, prices and answers. Done badly, it is ignored or even flagged as spam.

This applies to every platform, whether your site runs on WordPress, Shopify, Wix, Squarespace, Webflow or custom code. Only the way you add the code differs.

What structured data is

Search engines read your text, but they have to guess its meaning. Structured data removes the guesswork using a shared vocabulary from schema.org. The recommended format is JSON-LD, a script block placed in the page that does not change how the page looks:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "Example Shop",
  "url": "https://www.example.com/",
  "logo": "https://www.example.com/logo.png"
}
</script>

Why it is worth adding

It is not a ranking switch. Google says structured data helps understanding and eligibility for rich results, not a direct ranking boost.

Which types to start with

Step 1: check what you already have

Many themes, shop platforms and SEO plugins add some markup already. View your page source and search for application/ld+json, or run the page through the on-page SEO checker. Avoid adding a second copy of the same type, since duplicates conflict.

Step 2: pick the right type for each page

Match the type to the page's main purpose. A product page gets Product, a post gets Article, the home page gets Organization. Use one primary type per page, with others nested or added only when they are true.

Step 3: add the markup

Step 4: follow the rules

Step 5: test it

Use Google's Rich Results Test and the Schema Markup Validator to catch syntax errors and missing fields. After publishing, open the Enhancements reports in Google Search Console to see valid items, warnings and errors across the site.

Watch out for injected markup

Attackers sometimes inject fake review ratings or spam links into structured data, or add unfamiliar script blocks that only search engines see. If rich results show reviews you never wrote, or the source contains JSON-LD you cannot explain, read what website cloaking is and how to check if your website is hacked. Pair markup with sound basics such as good title tags and meta descriptions.

Common questions

Does schema markup improve rankings?

Not directly. It helps search engines understand the page and makes it eligible for rich results, which can raise click-through.

JSON-LD or microdata?

JSON-LD. Google recommends it, and it keeps the code separate from your visible HTML, so it is easier to maintain.

Will I definitely get rich results?

No. Valid markup makes you eligible, but Google decides when to show them.

Can wrong markup hurt my site?

Misleading markup can trigger a manual action that removes rich results. Mark up only what is true and visible.

Free tools for this problem

More guides