Skip to main content

SiteLinksSearchBox Schema Missing

Issue No: 234

Category: Structured Data & Rich Results

Issue type: Suggestion

Priority: STANDARD

Description

The homepage WebSite schema is present but missing the SearchAction property, preventing Google from displaying a Sitelinks Search Box beneath the homepage result for branded queries.

How do we capture it

  • Check WebSite JSON-LD block on homepage for potentialAction with "@type": "SearchAction"
  • Verify the urlTemplate contains {search_term_string} and the URL resolves
  • Only trigger if the site actually has functioning internal search

What to store

StructuredDataAudit record with schemaType = SiteLinksSearchBox, issueNumber = 152, plus StructuredDataField rows:

FieldTypeComment
website_schema_existsbooleanWebSite schema block is present
has_search_actionbooleanpotentialAction.SearchAction present
has_url_templatebooleanurlTemplate with {search_term_string} present
has_query_inputbooleanquery-input declared
site_has_searchbooleanSite actually has functioning internal search

Core audit fields used: isPresent, rawJson

Condition for trigger

  • Trigger Rule 1: SearchAction missing on site with search
    • Target Field: has_search_action
    • Evaluation Logic: has_search_action = false AND website_schema_exists = true AND site_has_search = true
    • Severity: STANDARD
    • Diagnostic Message: "WebSite schema exists and site has internal search, but SearchAction is not declared."

Sources

Long description

Adds a visible search box under your homepage SERP result for branded queries. Google decides whether to show it — schema makes you eligible. Do NOT implement if your site has no internal search feature.

{
"@context": "https://schema.org",
"@type": "WebSite",
"url": "https://www.example.com",
"potentialAction": {
"@type": "SearchAction",
"target": {
"@type": "EntryPoint",
"urlTemplate": "https://www.example.com/search?q={search_term_string}"
},
"query-input": "required name=search_term_string"
}
}

Common URL patterns: WordPress /?s={search_term_string}, Shopify /search?q={search_term_string}.

How to Fix

  1. Ensure WebSite schema exists first (see Issue #54)
  2. Add potentialAction with SearchAction and a valid URL template
  3. Test the search URL returns real results
  4. Only implement if your site has functional internal search