Skip to content
Published Authored byBilly Reiner

Schema · How-to

Shopify WebSite schema

WebSite is the Schema.org type for the storefront as a whole1. Like Organization, it lives in theme.liquid and fires once per page. Its highest-leverage property is potentialAction with a SearchAction, which declares the URL template for the store's internal search (Shopify's /search?q={query}). Google retired the visible Sitelinks Searchbox rich result on 2024-10-212, but the markup remains valid Schema.org — AI engines and some search engines still parse it as an entity-search-capability signal.

Why WebSite earns the install slot on every Shopify storefront in 2026: it's a 30-line block in theme.liquid that consolidates the site's identity (name, url, alternateName, publisher reference) and exposes the internal search to AI agents that may want to query the store directly. The Sitelinks Searchbox SERP feature is gone; the entity signal remains.

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.

Mental model: WebSite is the parent of every page on the storefront. Organization owns the brand; WebSite owns the domain. The two share territory but answer different questions: Organization tells AI engines what entity runs this site; WebSite tells them what the site itself is called, what language it's in, and how to search it programmatically.

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).

  • name — recommended. {{ shop.name | escape }}.
  • url — required. {{ shop.url }}/.
  • alternateName — optional. Useful when the storefront brand differs from the legal entity name.
  • inLanguage — recommended. {{ shop.locale }} for the primary locale, or a string like 'en-US'.
  • publisher — recommended. { "@id": "{{ shop.url }}#organization" } — references the Organization defined separately.
  • potentialAction — optional but recommended. SearchAction with target template and query-input.

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.

JSON-LD WebSite in theme.liquid — pairs with Organization
 <script type="application/ld+json"> { "@context": "https://schema.org", "@type": "WebSite", "@id": "{{ shop.url }}#website", "url": "{{ shop.url }}/", "name": "{{ shop.name | escape }}", "inLanguage": "{{ shop.locale }}", "publisher": { "@id": "{{ shop.url }}#organization" }, "potentialAction": { "@type": "SearchAction", "target": { "@type": "EntryPoint", "urlTemplate": "{{ shop.url }}/search?q={search_term_string}" }, "query-input": "required name=search_term_string" } } </script> 

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.

A subtle Shopify gotcha: shop.locale returns a locale code like 'en' rather than a fully-qualified 'en-US'. If your validation needs to be locale-strict, hard-code the locale string in the JSON-LD or build it via Liquid string concatenation.

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.

A fourth gotcha for multi-language Shopify stores: WebSite.inLanguage describes the primary language, but per-page inLanguage on individual Article or Product blocks may differ. Don't propagate WebSite.inLanguage as the universal language for all child entities — each page's primary language belongs on that page's primary entity.