WebSite schema markup on your homepage enables the Sitelinks Searchbox in Google Search — the search input that sometimes appears under your site listing, letting users search your site directly from the search results page. It also helps Google associate your site name with your domain. Every site should have a WebSite schema on its homepage.
| Property | Type | Description |
|---|---|---|
namerich result | string | The name of the website. |
urlrich result | URL | The URL of the website's homepage. |
Missing recommended properties generate warnings. They won't block validation, but rich result-tagged properties are needed for full Google rich result eligibility.
| Property | Type | Description |
|---|---|---|
potentialActionrich result | SearchAction | A SearchAction that enables the Sitelinks Searchbox. Requires target (URL template) and query-input. |
description | string | A description of the website. |
sameAs | URL array | URLs that verify this website's identity on other platforms. |
Rich result type: Sitelinks Searchbox
Requirements: Required: name and url. For Sitelinks Searchbox: add potentialAction as a SearchAction with target URL template and query-input.
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Example",
"url": "https://example.com",
"description": "The official website of Example.",
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://example.com/search?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
}Validate this schema against Google's requirements in one API call:
curl "https://schemacheck.dev/api/v1/validate" \
-H "x-api-key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonld":{"@context":"https://schema.org","@type":"WebSite","name":"Example","url":"https://example.com","description":"The official website of Example.","potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://example.com/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}}'100 free validations/month. No credit card required.