designwithfocus

On-page SEO

How to Create Rich Snippets for a Website with JSON-LD

By Design With Focus Team 6 min read
A search result card with an image, a headline, and a date line

Short answer

You create a chance at rich snippets by adding structured data, usually JSON-LD, that matches the visible page, then testing it. Google says that markup can make a result more useful, and it also says a rich result is not guaranteed. For an article, the supported types are Article, NewsArticle, and BlogPosting, and none of those properties are required.

Last verified against the sources listed below.

Key takeaways

  • Google recommends JSON-LD and also accepts Microdata and RDFa when the markup is valid.
  • The Rich Results Test checks a public URL and can preview some features. It is not a promise of display.
  • Article markup has no required properties. Add headline, image, dates, and author when they apply.
  • Google asks for article images of at least 50K pixels, width times height, at 16x9, 4x3, and 1x1.
  • A CMS such as WordPress may add the script through a plugin instead of a hand-edited template.

How to create rich snippets for website pages is to add structured data that describes the visible content, then test the public URL. A rich result is not guaranteed.

Google’s introduction to structured data says the markup is a standard format for classifying a page, and that adding it can enable richer results. The same family of docs is what structured data in SEO is about.

The Rich Results Test defines a rich result as an experience on a Google surface that goes beyond the standard blue link. It can include carousels, images, or other non-text elements.

What you need

You need a page with visible content, a type Google documents for that content, and a way to put JSON-LD on that same page.

Google says most Search structured data uses schema.org vocabulary, and that the Search Central guides define Google’s behavior. Schema.org’s Article type describes an article such as a news article or an investigative report.

Google’s Article guide narrows the types it supports to Article, NewsArticle, and BlogPosting. There is no markup requirement to be eligible for Google News features such as Top stories. The Article type tells Google more explicitly what the page is.

JSON-LD describes itself as a lightweight Linked Data format based on JSON. Google recommends it when your setup allows it, because the script is separate from the visible text and is easier to maintain.

Microdata and RDFa are also accepted. All three are fine if the markup is valid and matches the feature’s documentation. Data-vocabulary.org markup is no longer eligible.

Pick a type and write JSON-LD

Choose the type that matches the page, then write only properties that a person can see on that page.

For a news, blog, or sports article, use one of the three types above. Google’s Article guide says there are no required properties, so add the ones that apply.

The recommended list is author, author.name, author.url, dateModified, datePublished, headline, and image. Dates should be ISO 8601, Google recommends a timezone, and long headlines may be truncated without a published character count.

Images must be crawlable, must show the article rather than a logo or a caption, and must use a format Google Images supports. For best results the guide asks for several high-resolution images, at least 50K pixels when width is multiplied by height, at 16x9, 4x3, and 1x1. A short Article script looks like this:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "How the team ships a page",
  "datePublished": "2026-03-01T12:00:00-05:00",
  "author": {"@type": "Person", "name": "Example Author"}
}
</script>

Count a headline draft with the word counter if you want a word total. Google’s truncation note is not a word cap. The script must match text that is actually on the page. Do not mark up a fact the reader cannot see.

Add it, then test it

Put the script on the page, confirm the page is public, and run the Rich Results Test before you treat the work as done.

  1. Pick a documented type that matches the visible page, such as Article for a news or blog article.
  2. Write JSON-LD that includes the recommended properties you can support with on-page text.
  3. Add a script element with type="application/ld+json" in the head or the body.
  4. Open the Rich Results Test, submit the public URL, and fix critical errors.
  5. Deploy a few pages and check them with the URL Inspection tool. Submit a sitemap if you want Google notified of later changes.

Google’s introduction says a CMS such as WordPress may hide the HTML. A settings page or a plugin can print the script instead. What WordPress is used for is the publishing side of that choice. The plugin still has to emit the type you picked and the fields the type guide lists.

The Article guide says to follow the Search Essentials, the general structured data guidelines, and the technical guidelines, or the markup may be ineligible. It also says Google does not guarantee that features which use structured data will show in results.

The test can preview some features, and it is not a promise. The guide says it may take several days after publishing for Google to crawl the URL.

The introduction says you must include every required property for an object to be eligible for an enhanced display. Article is the case where the type page says there are no required properties, so “required” means the properties that type’s own guide marks as required. Adding more recommended properties can make an enhanced display more likely. Complete, accurate fields matter more than a long list of thin ones.

Fix the usual test failures

A failed test is usually invalid JSON, a type that does not match the page, or a fact the user cannot see.

What the test or the page shows Likely cause What to change
Critical error in the Rich Results Test The JSON is invalid or a documented property is malformed Fix the syntax, then retest the public URL
The feature is eligible but not in results Google does not guarantee display Keep the markup valid and wait for a recrawl
Markup about hidden text Structured data must match visible content Delete facts the reader cannot see
Empty URL created only for the script Google says not to build blank pages for markup Put the script on the real page
Article image missing or tiny The guide asks for crawlable images, 50K pixels and up Add images at 16x9, 4x3, and 1x1
Authors merged in one name Each author needs a separate author entry Split the names and set Person or Organization

The introduction lists public case studies, including a 25 percent higher click-through rate on Rotten Tomatoes pages with structured data and an 82 percent higher click-through rate on Nestlé pages that show as rich results. Those figures are that page’s measurements for those sites, not a rate to expect on yours.

Use Search Console’s before-and-after approach on a few stable pages if you want your own comparison. The introduction’s steps are to pick pages with several months of data, add valid markup, confirm Google saw it with URL Inspection, then compare a few months in the Performance report.

Frequently asked questions

Does a passing Rich Results Test guarantee a rich result?

No. Google's Article troubleshooting section says Google does not guarantee that features which consume structured data will show up in search results. The Rich Results Test tells you which rich results the structured data on a public page can generate, and it flags errors. Eligibility still depends on the guidelines for that type. The Article guide also says non-critical warnings are worth fixing because they can improve quality, but fixing them is not required for eligibility. Allow several days after publishing before you expect a recrawl.

Which image sizes does the Article guide ask for?

If you omit the timezone on datePublished or dateModified, Google's Article guide says it defaults to the timezone used by Googlebot. The Rich Results Test does not warn on those two properties, because they are recommended only when you decide they apply. Image URLs still have to be crawlable, and the URL Inspection tool is how the guide says to check access. Logos and captions are the wrong images for this property.

Can JavaScript insert the JSON-LD?

Yes. Google's introduction says it can read JSON-LD injected into the page, including by JavaScript or a CMS widget. The script can sit in the head or the body. Facts in the script still have to be visible, and you should not create an empty page whose only job is to hold the markup. After it is live, URL Inspection shows whether Google can see the page. A robots.txt block, a noindex tag, or a login requirement keeps the page out of that check.

What goes in the author field for an article?

Google's Article guide says author is a Person or an Organization. List every author shown on the page, each in a separate author entry, and do not join two names in one name field. Do not put a job title, an honorific, or the words posted by inside author.name. Job title has its own property. Use Person for a person and Organization for an organization. The publisher is a separate property.

What if the site is on WordPress and you cannot edit the template?

Google's introduction says a CMS such as WordPress, Wix, or Shopify may hide the HTML, and that a settings screen or a plugin may be how you add structured data. It tells you to search the CMS's own instructions, and it gives wordpress structured data plugin as an example query. It does not name one plugin. The data still has to match the visible page and the type you picked.

Sources