JSON-LD & Structured Data

Introduction

JSON-LD (JavaScript Object Notation for Linked Data) is the recommended method for adding structured data to your website. It allows you to communicate directly with search engines about your content entities (Products, Articles, Organizations, Events).

Why it matters

Structured data powers rich search results (Rich Snippets). If you want star ratings, product prices, event dates, or recipe cooking times to appear directly in Google search results, you must use JSON-LD schema markup.

Where it appears

  • Invisible to users, embedded in a <script> tag.
  • Google Search Results (Rich Snippets, Knowledge Panels).

Requirements

  • A <script type="application/ld+json"> block containing valid JSON.
  • Adherence to the vocabulary defined by Schema.org.

Best Practices

  • Only mark up content that is visible to users on the page.
  • Test your structured data using Google's Rich Results Test tool.
  • Provide as many recommended properties as possible.

Common Mistakes

  • Syntax errors in the JSON (missing commas or quotes).
  • Marking up content that doesn't exist on the page (violates search engine guidelines).
  • Using outdated schema formats like Microdata instead of JSON-LD.

Implementation

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Organization",
  "name": "SeeSite",
  "url": "https://seesite.dev",
  "logo": "https://seesite.dev/logo.png"
}
</script>

Related Topics