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}. Note: Shopify's default robots.txt blocks /search — the markup still validates, but Google's crawler will not execute the SearchAction against indexed results.
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 — shop.locale), publisher (Organization reference by @id — points to the Organization defined in theme.liquid), potentialAction (Action with SearchAction).
JSON-LD example — WebSite in theme.liquid
The block below is the full WebSite JSON-LD that belongs in theme.liquid <head>, immediately after the Organization block. The SearchAction target uses Shopify's /search?q= route. The publisher field references the Organization by @id so AI engines consolidate the two entities.
Validation
Rich Results Test against the Shopify homepage with WebSite in theme.liquid should report WebSite detected, zero errors, and (formerly) eligibility for Sitelinks Searchbox. Post-2024-10-21, the rich result is gone — the validator still parses the block but no longer reports eligibility for that specific feature. Schema.org Markup Validator confirms the structure is valid regardless.
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: omitting the SearchAction entirely, which loses the entity-search-capability signal even though the rich result is retired.