What WebSite schema is
Per Schema.org v30.0, WebSite is 'a set of related web pages and other items typically served from a single web domain and accessible via URLs.' Inheritance: Thing > CreativeWork > WebSite. Key WebSite-specific property: potentialAction (an Action — typically SearchAction for site-search declaration). Inherited CreativeWork properties: url, name, description, datePublished, dateModified, publisher (Person or Organization), inLanguage.
Sitelinks Searchbox, SearchAction, and Shopify's /search route
The SearchAction inside WebSite declares a URL template that consumers can append a query string to. The canonical pattern: target is a URL with {search_term_string} placeholder, query-input names the same variable. On Shopify, the storefront search route is /search?q=, so the target template becomes {shop.url}/search?q={search_term_string}. Whether robots.txt blocks /search depends on the store: Shopify's managed default robots.txt, served to stores without a robots.txt.liquid template, no longer disallows /search, while stores with a template still print the older rules that do. Either way, search result pages answer with an x-robots-tag: noindex, nofollow header, so they stay out of the index. None of this affects the markup, and since late 2024 Google doesn't use it for any search feature.
WebSite fields
The WebSite properties most-used on Shopify: name (Text — shop.name), url (URL — shop.url with trailing slash), alternateName (Text — optional brand abbreviation or trading-as name), inLanguage (Text — request.locale.iso_code), publisher (Organization reference by @id — points to the Organization defined in theme.liquid), potentialAction (Action with SearchAction). Google's site-name documentation requires only name and url and recommends alternateName; the rest are Schema.org properties Google doesn't use for site names.
JSON-LD example — WebSite in theme.liquid
The block below is the full WebSite JSON-LD for theme.liquid <head>, immediately after the Organization block and behind the same home-page condition, because Google reads WebSite for site names on the home page only. The SearchAction target uses Shopify's /search?q= route; it's optional and you can delete it. The publisher field references the Organization by @id. On Dawn, delete the theme's own WebSite block in sections/header.liquid when you add this one.
Validation
Validate WebSite with the Schema Markup Validator (validator.schema.org), not the Rich Results Test. Google's site-name documentation says site names aren't supported in the Rich Results Test, and since the sitelinks search box went away the test no longer highlights SearchAction either. Expected output from the Schema Markup Validator: WebSite detected, zero errors.
Shopify gotchas on WebSite
Three gotchas. First: pointing the SearchAction target at a non-existent route — verify {shop.url}/search?q= resolves to the storefront search results page on your specific theme. Some themes use /search?type=product&q=; verify before shipping. Second: emitting WebSite without referencing the Organization by @id, leaving the two entities disconnected. Third: printing WebSite only on inner pages, or pointing url at something other than the home page. Google requires the block on the home page, with url set to that home page.