WebSite Schema Markup
Generate WebSite JSON-LD with SearchAction to enable Google's Sitelinks Searchbox — a branded search feature that drives direct site engagement.
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>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.
Required fields
urlpotentialAction.target
Recommended fields
namealternateName
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
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 →