Navigation

WebSite Schema Markup

Generate WebSite JSON-LD with SearchAction to enable Google's Sitelinks Searchbox — a branded search feature that drives direct site engagement.

Rich result type
Sitelinks Searchbox in SERP
Google documentation →

What valid WebSite JSON-LD looks like

A complete, validator-ready example — drop it in your <head>, swap the values for yours, and you're done.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "url": "https://yoursite.com",
  "name": "Your Site Name",
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://yoursite.com/search?q={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}
</script>
Want more than WebSite validation?

Run a full CrispAudit on your URL

Schema, cookies (GDPR/CCPA), accessibility, SEO — plus AI-generated fixes populated with your page's actual content. Free.

Run full audit →

Required fields

  • url
  • potentialAction.target

Recommended fields

  • name
  • alternateName

Common WebSite schema errors

  • potentialAction target URL doesn't return search results
  • query-input not set to 'required name=search_term_string'
  • WebSite schema placed on inner pages instead of homepage only
  • target URL missing the {search_term_string} placeholder

Generate WebSite schema

Fill in the fields below to generate valid JSON-LD you can paste directly into your page.

WebSite schema — frequently asked questions

Does every site get the Sitelinks Searchbox?

No — Google decides whether to show the Sitelinks Searchbox based on site authority and search volume. WebSite schema is a prerequisite but doesn't guarantee the feature.

Where should WebSite schema be placed?

WebSite schema should only appear on your homepage (root URL). Placing it on other pages has no additional benefit and can confuse Google's interpretation.

What does the SearchAction target URL need to do?

The target URL must actually perform a search and return results when the {search_term_string} is replaced with a query. If your site doesn't have search functionality, omit the SearchAction.

Other schema types

E-commerceProductProduct snippets, Google ShoppingContentArticleTop Stories, Article rich resultsRich ResultsFAQPageFAQ dropdowns in SERPBrandingOrganizationKnowledge Panel, logo in searchLocal SEOLocalBusinessLocal Knowledge Panel, Google MapsNavigationBreadcrumbListBreadcrumb trails in SERP

Audit your full schema coverage

CrispAudit checks all schema types at once — get a complete score and fix-it report for any URL.

Run free audit →