WebSite SearchAction and the retired sitelinks searchbox
WebSite schema on a homepage with no SearchAction, or a SearchAction missing target or query-input. squirrel checks the homepage markup.
What WebSite SearchAction is
WebSite is the schema.org type for a site as a whole, usually declared once on the homepage. Its potentialAction property can hold a SearchAction that points at the site’s own search endpoint: target is a URL template containing a {search_term_string} placeholder, and query-input names that placeholder so a consumer knows what to substitute.
Google used this markup to render a sitelinks search box under a site’s result. It removed that element on 21 November 2024 and deleted the documentation for it, so the search box the markup produced is gone. The markup is still valid schema.org and still describes a real endpoint, which is why this rule reports at info severity rather than failing a page for its absence.
What squirrel checks
The rule reads every script[type="application/ld+json"] on the page and keeps the first WebSite node from the last script that contains one, matching either a plain @type or an @type array. Depending on what it finds it emits zero to two checks:
website-schema: passes with the messageWebSite schema foundwhen the node exists. When it does not and the page is the homepage, meaning a URL path of/or empty, it reports at info status with the messageNo WebSite schema on homepageand the valueConsider adding for sitelinks searchbox. On any other page with noWebSitenode the rule emits nothing at all.website-search: reports at info status with the messageWebSite has no potentialActionand the valueAdd SearchAction for sitelinks searchboxwhenpotentialActionis absent, or with the messageWebSite has no SearchActionwhenpotentialActionexists but holds no node typedSearchAction.search-action: warns with the messageSearchAction missing target URLwhentargetis absent, warns withSearchAction missing query-inputwhentargetis present butquery-inputis not, and otherwise passes withSearchAction properly configured.
A SearchAction is recognised only when its @type is exactly the string SearchAction; an @type array containing it is not matched. Every property test is a truthiness test rather than a presence test, so a property present but empty, 0 or false counts as missing. The rule checks that target and query-input are truthy and stops there. It does not parse the target template or confirm that the placeholder in query-input matches the one in target.
A potentialAction written as a node reference, {"@id": "…#search"}, is read from the node with that @id anywhere in the page’s JSON-LD, in the same @graph or another script. A relative @id resolves against the page URL. A reference to a node the page does not have is not a SearchAction.
How to fix it
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://example.com/",
"potentialAction": {
"@type": "SearchAction",
"target": "https://example.com/search?q={search_term_string}",
"query-input": "required name=search_term_string"
}
}
</script>This block goes in the homepage <head>.
JSON-LD wrapped in an @graph array, which is what Yoast, Rank Math and several other generators emit, is read the same as a top-level node: the rule flattens each script before looking for WebSite.
| Rule ID | schema/website-search |
| Category | Structured Data |
| Scope | Per-page |
| Severity | info |
| Weight | 3/10 |
Enable / disable
Disable this rule
[rules]
disable = ["schema/website-search"]Disable all Structured Data rules
[rules]
disable = ["schema/*"]Enable only this rule
[rules]
enable = ["schema/website-search"]enable replaces the default ["*"], so this is the only rule selected. Leave disable out: a rule that matches any disable pattern is skipped even when enable names it. Only an enabled setting under a rule’s own [rule_options] table overrides both lists.
Related rules
- schema/organization: the Organization node that usually sits alongside
WebSiteon the homepage. - schema/json-ld-valid: whether the JSON-LD parses and passes schema.org validation at all.
- schema/breadcrumb: the other site-structure markup, checked on every non-homepage URL.
- schema/coverage-outlier: pages missing the structured data the rest of their page type carries.
Structured data findings ship in every audit next to the core SEO, performance and agent experience rules. See Fix SEO issues with AI for how an agent works through a report.
References
- Farewell, Sitelinks Search Box, Google Search Central Blog
- WebSite, schema.org
- SearchAction, schema.org
Check your site
Run squirrel audit https://example.com and open the Structured Data section of the report. The homepage result shows which part of the markup is missing. Signed-out local audits need no account and cost nothing. Signed-in audits spend credits.