Structured data (Schema.org)
Page content described in Schema.org as JSON-LD: what to mark up, what to skip, and the end of FAQ rich results.
SEO & analytics
- Category
- SEO & analytics
In practice
Structured data describes a page in the Schema.org vocabulary, which search engines read directly. I write it as JSON-LD, add it to every public web project as standard, and describe only what a visitor sees. It gives a page a chance at rich results; Google decides whether to show them.
What is Structured data (Schema.org)?
Schema.org is a shared vocabulary of types and properties for describing the content of pages, for example an organization or a service. An open community runs it, and Google and Microsoft are among its founders. The vocabulary does not say how to write the data down. Formats do that, among them Microdata and JSON-LD.
JSON-LD is a JSON-based syntax, and its version 1.1 is a W3C Recommendation from 2020. It goes in a script tag, apart from the visible text, so it does not mix with the HTML of the content. Google supports three formats and recommends JSON-LD, because it is the easiest to implement and maintain at scale. That is why I choose it by default.
How I approach markup
I start from what the page should communicate, and only then pick types. Markup describes content already on the page, so it is no place for things the visitor will not see.
Types from visible content
I go through the page and ask, block by block, whether the visitor sees it, and describe only such blocks. The Google guidelines require the data to be a true representation of the page content, so I add nothing hidden or inflated.
Required fields and validation
For types that have a function in Google results, I fill in the required properties of the type, because without them a page is not eligible for a rich result. Before launch I check the markup in the Rich Results Test and the Schema Markup Validator, afterwards in Search Console.
One data source and safe output
I generate the markup from the same data that produces the page content, not by hand next to it. Then a changed service name or email address does not drift from what is visible. In Next.js I also replace the less-than character with its unicode escape, because
JSON.stringifydoes not protect against XSS injection.
When it fits, and when it doesn't
Markup makes sense where there is something to describe and someone to show it to.
A good fit when
- A service or portfolio page where a search engine should recognize who you are and what you offer.
- A page inside a site hierarchy, whose position can be described.
- Articles and posts where the author and date matter.
- A store where the product, price and availability in the markup match what the page shows.
Not a fit when
- Content the visitor does not see: hidden text or reviews added only to the markup.
- A type that does not fit the page, chosen because Google gives a rich result for it.
- An expectation that markup alone will lift a ranking or that a rich result will certainly appear.
- A site where nobody will update the markup after the content changes.
When the problem is page speed rather than the way content is interpreted, I begin with Core Web Vitals. When structured data is part of wider work on visibility, that is covered by technical SEO and the audit.
Frequently asked questions
Does your page tell search engines who you are?
Tell me which page you have and whether it carries any markup yet. I will check whether it is correct and matches the content. The details are on the [[service:seo|SEO]] and [[service:audyt|audit]] pages.