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. Google uses it for site names: name and url are required, alternateName is recommended, and the block must be on the home page6. It can also carry a potentialAction with a SearchAction, which declares the URL template for the store's internal search (Shopify's /search?q={query}). That SearchAction used to power the sitelinks search box. Google announced its removal on 2024-10-21 and stopped showing it from 2024-11-21, in every country and language2. The markup is still valid Schema.org and does no harm, but it no longer earns a search box in Google.

Why WebSite still earns a slot on a Shopify storefront in 2026: it's a short block on the home page that states the site's name (and alternateName) for Google's site-name system and links the site to its publisher by @id. Dawn already prints a minimal WebSite with a SearchAction on the home page8. Keeping the SearchAction is optional: Google says there's no need to remove it, and no Google feature uses it any more.

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

  • name — required for site names. {{ shop.name | json }}, no quotes around it5.
  • url — required. The home page: {{ shop.url }}/.
  • alternateName — recommended by Google. A shorter name or acronym Google can fall back on when it picks a site name.
  • inLanguage — optional. {{ request.locale.iso_code | json }} prints the language of the page being viewed, such as "en". Don't use shop.locale: Shopify deprecated it because the locale belongs to the request, not the shop, and replaced it with request.locale7.
  • publisher — optional. { "@id": "{{ shop.url }}#organization" } — references the Organization defined separately.
  • potentialAction — optional. A SearchAction with target template and query-input. Valid Schema.org, harmless, and no longer used by Google for anything.

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.

JSON-LD WebSite in theme.liquid, printed on the home page, pairs with Organization
{%- if request.page_type == 'index' -%}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "@id": "{{ shop.url }}#website",
  "url": "{{ shop.url }}/",
  "name": {{ shop.name | json }},
  "inLanguage": {{ request.locale.iso_code | json }},
  "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>
{%- endif -%}

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.

A subtle Shopify gotcha: shop.locale still renders on many themes, but Shopify has deprecated it in favour of request.locale7. request.locale.iso_code is an IETF language tag for the language the shopper is viewing, which is what inLanguage expects. Most stores get a bare language code such as en; that's valid, so there's no need to hard-code 'en-US'.

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.

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.