Site Search Box

No Comments
Site search box

What the Site Search Box is

The Sitelinks Searchbox is a search field that Google could show directly inside your brand's search result, letting people query your site without leaving the SERP. You signal eligibility with WebSite structured data that declares a SearchAction pointing at your own site search. The stakes are modest and shrinking: Google shows this feature far less than it used to, so treat it as a small nicety, not a growth lever.

The markup that declares it

You add JSON-LD to your home page describing your WebSite and a potentialAction of type SearchAction. The target is your site's search URL with a {search_term_string} placeholder Google fills in with whatever the user typed.

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebSite",
  "url": "https://example.com/",
  "potentialAction": {
    "@type": "SearchAction",
    "target": {
      "@type": "EntryPoint",
      "urlTemplate": "https://example.com/?s={search_term_string}"
    },
    "query-input": "required name=search_term_string"
  }
}
</script>

Two things make or break it. The urlTemplate must match how your search actually works (for WordPress that's usually /?s=), and the query-input name must be identical to the placeholder in the template. Get either wrong and Google ignores the whole block.

Searchbox vs. the search box people confuse it with

"Search box" gets used for three different things. Only one of them is this markup. Knowing which is which saves you from implementing the wrong fix.

FeatureWhere it appearsWho controls itWhat you do
Sitelinks Searchbox (this term)Inside your result on Google's SERPGoogle decides whether to show it; you declare eligibilityAdd WebSite + SearchAction JSON-LD on the home page
Google's own SERP search barTop of every Google results pageGoogle, entirelyNothing, it's not yours to touch
On-site search fieldOn your own website's header or navYou, fullyBuild and tune it; it powers the target URL above

Why you see it less now

Google has quietly reduced how often the Sitelinks Searchbox appears in results. It still validates the markup, and the feature isn't deprecated, but the practical hit rate is low. That changes the math: the markup is cheap and harmless to add, but don't build a project plan around getting the box back. If it doesn't show, that's Google's call, not a bug in your code.

How to check it on your own site

  1. View source on your home page and search for SearchAction. If it's missing, the feature can't appear at all.
  2. Confirm the urlTemplate is your real search URL. Paste a test query into it in a browser and verify it returns results, not a 404.
  3. Run the home page through Google's Rich Results Test to confirm the WebSite markup parses with no errors.
  4. Check that this JSON-LD lives on the home page specifically. Google reads it there, not on interior pages.
  5. Search Google for your exact brand name and see whether the box renders. If it doesn't, your markup can still be perfect, Google just isn't showing it.
  6. Make sure you have exactly one WebSite block. Duplicate or conflicting declarations are a common reason it's skipped.

Common mistakes and how to fix them

  • Mismatched placeholder names. The query-input name and the {search_term_string} in the template must match exactly. This is the single most common failure. Fix the names, retest.
  • Pointing the target at a search that doesn't exist. If your site search lives at /search?q= but the markup says /?s=, the box would send users nowhere. Match the template to your live search.
  • Putting the markup on the wrong page. It belongs on the home page. Interior-page placement gets ignored.
  • Expecting the box because your markup is valid. Validation means eligible, not shown. Google displays it selectively, so don't file a "bug" when it's absent.
  • Shipping two conflicting WebSite objects from a plugin and a theme both injecting schema. Consolidate to one clean block.

FAQ

Will adding this markup guarantee the search box appears?

No. It only makes you eligible. Google decides whether to render it, and lately it renders far less often. The markup is worth adding because it's cheap, but treat the box itself as a bonus.

Where does the JSON-LD go?

On your home page, in a <script type="application/ld+json"> block. Most schema plugins let you add site-wide WebSite markup automatically.

What's the difference between this and sitelinks?

They're related SERP features that show under your brand result. Sitelinks are the extra indented links Google picks algorithmically; the searchbox is a query field you declare with markup. Both are Google's call to display.

Does it help my rankings?

No. It's a presentation feature, not a ranking signal. It can improve the look and usability of your brand result, but it won't move you up the page.

My search URL uses parameters. Does that break it?

Not if the template matches. Whatever your real search path is, put that exact pattern in urlTemplate with {search_term_string} where the query goes. For the full build, see the search box implementation guide and the broader structured data reference.

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog