Implementation Guide

Learn how to add schema markup to your website and improve your search visibility with rich snippets.

Quick Start

  1. Generate your schema: Use our generator to create valid JSON-LD markup
  2. Copy the code: Click the "Copy Code" button to copy your schema
  3. Add to your page: Paste the code in your HTML head section
  4. Test it: Use Google's Rich Results Test to validate

Where to Add Schema Markup

Schema markup should be added inside a script tag with type application/ld+json in your page's HTML.

<!DOCTYPE html>
<html>
<head>
  <title>My Article</title>

  <!-- Add schema markup here -->
  <script type="application/ld+json">
  {
    "@context": "https://schema.org",
    "@type": "Article",
    "headline": "Your Article Title",
    "author": {
      "@type": "Person",
      "name": "John Doe"
    }
  }
  </script>
</head>
<body>
  ...
</body>
</html>

Real-World Examples

Here are complete, copy-paste ready examples for common schema types:

📄 Blog Article with Author

Perfect for blog posts and editorial content

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Article",
  "headline": "10 Tips for Better SEO in 2025",
  "image": "https://example.com/images/seo-tips.jpg",
  "author": {
    "@type": "Person",
    "name": "Jane Smith",
    "url": "https://example.com/authors/jane-smith"
  },
  "datePublished": "2025-01-15",
  "dateModified": "2025-01-20",
  "publisher": {
    "@type": "Organization",
    "name": "Marketing Blog",
    "logo": {
      "@type": "ImageObject",
      "url": "https://example.com/logo.png"
    }
  },
  "description": "Learn the latest SEO strategies to boost your rankings in 2025."
}
</script>

🛍️ Product with Reviews

E-commerce product with pricing and ratings

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Wireless Bluetooth Headphones",
  "image": "https://example.com/products/headphones.jpg",
  "description": "Premium noise-cancelling headphones",
  "brand": {
    "@type": "Brand",
    "name": "AudioTech"
  },
  "offers": {
    "@type": "Offer",
    "price": "79.99",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock",
    "url": "https://example.com/products/headphones"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.5",
    "reviewCount": "127"
  }
}
</script>

🏪 Local Business

For restaurants, stores, and service businesses

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Restaurant",
  "name": "The Cozy Cafe",
  "image": "https://example.com/cafe.jpg",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "123 Main St",
    "addressLocality": "San Francisco",
    "addressRegion": "CA",
    "postalCode": "94102",
    "addressCountry": "US"
  },
  "telephone": "+1-415-555-0123",
  "openingHours": "Mo-Fr 08:00-20:00, Sa-Su 09:00-21:00",
  "priceRange": "$$",
  "servesCuisine": "American, Coffee",
  "acceptsReservations": "true"
}
</script>

❓ FAQ Schema

For frequently asked questions pages

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [
    {
      "@type": "Question",
      "name": "What is schema markup?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Schema markup is structured data that helps search engines understand your content and display rich snippets in search results."
      }
    },
    {
      "@type": "Question",
      "name": "How long does it take to see results?",
      "acceptedAnswer": {
        "@type": "Answer",
        "text": "Rich snippets typically appear within 1-4 weeks after implementation, though results vary."
      }
    }
  ]
}
</script>

Platform-Specific Instructions

WordPress

Add schema markup to individual posts or pages:

  • Use a plugin like "Insert Headers and Footers"
  • Or add directly to your theme's header.php file
  • Yoast SEO and RankMath also support schema markup

Shopify

Add to your theme's theme.liquid file in the head section.

Next.js / Nuxt / React

Use next/head or your framework's head management:

<Head>
  <script
    type="application/ld+json"
    dangerouslySetInnerHTML={ { __html: JSON.stringify(schema) } }
  />
</Head>

Google Tag Manager

Create a Custom HTML tag with your schema markup and set it to fire on page load.

Testing Your Schema

After implementing schema markup, test it to ensure it's valid:

Best Practices

Keep it accurate: Ensure your schema matches your actual page content. Misleading markup can result in penalties.

Use specific types: Choose the most specific schema type. Use BlogPosting instead of generic Article when appropriate.

Include recommended fields: While only required fields are mandatory, recommended fields improve your rich snippet appearance.

Test before deploying: Always validate your schema with Google's Rich Results Test before publishing.

Update regularly: Keep your schema current when content changes (prices, dates, availability, etc.).

Troubleshooting

Schema not appearing in search results?

Rich snippets can take 1-4 weeks to appear after implementation. Google doesn't guarantee rich results even with valid markup. Ensure your page has good content quality and follows webmaster guidelines.

Validation errors?

Check for missing required fields, invalid URLs (must be absolute, not relative), incorrect date formats (use ISO 8601), and proper escaping of quotes in JSON.

Multiple schemas on one page?

You can include multiple schema types on one page by using separate script tags with type application/ld+json or by combining them in an array.

Common Mistakes to Avoid

Don't use schema for hidden content: Schema should describe visible content on the page.

Don't markup content from other pages: Each schema should only describe the current page.

Don't use relative URLs: Always use complete URLs with protocol (https://) for image, url, and other link fields.

Don't fake reviews or ratings: Marking up reviews or ratings that don't exist can result in manual penalties.

💡 Pro Tip

Rich snippets don't appear immediately. After implementing schema markup, it may take a few days to a few weeks for Google to crawl your page and display rich results. Be patient and focus on content quality!