Webmaster level: All
Today you’ll see a new and improved sitelinks search box. When shown, it will make it easier for users to reach specific content on your site, directly through your own site-search pages.
What’s this search box and when does it appear for my site?
When users search for a company by name—for example, [
Megadodo Publications] or [
Dunder Mifflin]—they may actually be looking for something specific on that website. In the past, when our algorithms recognized this, they'd display a larger set of
sitelinks and an additional search box below that search result, which let users do
site: searches over the site straight from the results, for example [
site:example.com hitchhiker guides].
This search box is now more prominent (above the sitelinks), supports
Autocomplete, and—if you use the right markup—will send the user directly to your website's own search pages.
How can I mark up my site?
You need to have a working site-specific search engine for your site. If you already have one, you can let us know by marking up your homepage as a
schema.org/WebSite entity with the
potentialAction property of the
schema.org/SearchAction markup. You can use JSON-LD, microdata, or RDFa to do this; check out the
full implementation details on our developer site.
If you implement the markup on your site, users will have the ability to jump directly from the sitelinks search box to your site’s search results page. If we don’t find any markup, we’ll show them a Google search results page for the corresponding site: query, as we’ve done until now.
As always, if you have questions, feel free to ask in our
Webmaster Help forum.
Update (16:30h CET, September 12th): We're noticing an enthusiastic uptick in the markup implementation after the initial announcement last week! Here are the two main issues we've observed so far, and what you need to do to fix them:
- Make sure that when you replace the curly braces and all that's inside of it with a search term it leads to a valid URL on your site.
For example: if your "target" value is "http://www.example.com/search?q={searchTerm}", ensure that "http://www.example.com/search?q=foo" and "http://www.example.com/search?q=bar" both lead to search result pages about "foo" and "bar".
- Make sure that the "query-input" field points to the same string that's inside the curly braces in the "target" field.
For example: if your "target" value is "http://www.example.com/search?q={searchTerm}", you must use "searchTerm" as the "name" within "query-input".
Posted by Mariya Moeva, Webmaster Trends Analyst, and Kaylin Spitz, Software Engineer