WebSite Schema Markup
WebSite markup on your homepage tells Google about your site as a whole and can enable the Sitelinks Search Box — a search box that appears in Google sitelinks, letting users search your site directly from Google.
Eligible Rich Results
When to Use WebSite
Properties
| Property | Type | Status | Description |
|---|---|---|---|
| name | Text | required | The website name. |
| url | URL | required | The homepage URL. |
| potentialAction | SearchAction | recommended | Defines the site search URL pattern for the Sitelinks Search Box. |
| description | Text | optional | Site description. |
JSON-LD Examples
Website with Search
Homepage markup with sitelinks search box.
{
"@context": "https://schema.org",
"@type": "WebSite",
"name": "Example Shop",
"url": "https://example.com",
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://example.com/search?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
} Common Mistakes
Adding WebSite markup to every page — it should only be on the homepage.
Not matching the potentialAction target URL to your actual search page URL.
Complete Guide to WebSite Schema Markup
WebSite schema markup belongs on your homepage and tells Google about your website as a whole. Its primary benefit is enabling the Sitelinks Search Box — a search input that appears directly in Google sitelinks for branded queries.
To enable the search box, include a potentialAction with a SearchAction that defines your site's search URL pattern. The target URL template uses {search_term_string} as a placeholder that Google replaces with the user's query.
Related Types
Ready to Create WebSite Markup?
Use our free generator to create valid WebSite JSON-LD markup with a visual form. No coding required.
Open Generator