I recently helped one of our clients configure their website to get sitelinks search box working. The following is a brief recap of my work.
[Although metlife.com is used as an example in this post, I have had no working relationship with metlife.com]
In early September, Google announced an improvement to sitelinks search box, which enabled people to reach your content more quickly from search results.
In my opinion, its most attractive feature would be the capability to alter the behavior of google.com. With the improved sitelinks search box, a search issued via the search box would lead to a search action from your website, and the result display is totally controlled by your internal search solution. How cool is that?! You would really make google.com work for you and your site.
How does the improved sitelinks search box work?
- From google.com, you can type the website you are really interested, for example, metlife.com, and the results displayed from google.com as following:
The sitelinks and a search box will show in the result page from google.com. You can see the grayed text display in the search box clearly showed ‘Search metlife.com’, which indicates if you type search terms there, the search will be done against metlife.com. - Type a search term into the Search Box
Please note the site-specific auto completion feature is supported by the search box.
-
Then click the search button, you will see the search results were totally controlled by www.metlife.com. We successfullly directed search in google.com to metlife.com, and provided search experiecen for users within metlife.com.
How to make it happen?
With the new improvement from Google, it is much simpler than you thought to make the sitelinks search box work for you.
- First of all, you have to have an in-house search solution.
Definitely Perficient can help you if you have the need or run into issues with your existing solution. -
Add the schema.org markup on your homepage tosection.
The following is an example for JSON-LD. The JavaScript code goes into the <head> section. You only need to place the Javascript code on the homepage and there is no need for it to be on any other page.
<script type="application/ld+json"> { "@context": "http://schema.org", "@type": "WebSite", "url": "https://www.metlife.com", "potentialAction": { "@type": "SearchAction", "target": "https://www.metlife.com/searchresults?query={search_term}", "query-input": "required name=search_term" } } </script>
This is just an example from metlife.com. If you need implement for your site, please carefully check the values for each field following the specification. Yours will be quite similar to it if JSON-LD is used.
- Set up a preferred canonical URL for your homepage, similar to the following:
<link rel="canonical" href="https://www.metlife.com" />
- Then that’s it.
The rest would be relaxing and wait for Google Search algorithms to identify your site as a candidate for the new sitelinks search box. With these changes, more traffic will get sent directly to your site whenever the search box shows up for it in our results. You also get site-specific autocomplete!
When will google.com display the sitelinks search box for my site?
Unfortunately we don’t know. Google.com will automatically decide if your site is warranted a search box based on some secret algorithm. The sitelinks search box appears only for navigational queries and when relevant for users. Google algorithms use a variety of factors to determine when the box appears, including the information on the site and different types of navigational queries from Search users. You may check this link to see furthe details and an explanation here.
How to disable the Sitelinks Search Box from google.com search result page?
It’s very interesting Goolge provided a way to disable sitelinks search box even it could not guarantee to put one for you. You can disable the Sitelinks Search feature by using a new meta tag named nositelinkssearchbox:
<meta name="google" content="nositelinkssearchbox">
Implementation reference
Google provided detailed document, please refer to it for details. I also found that it’s very helpful checking other sites that already implemented the feature. Here are a few of them: metlife.com, amfam.com, bettymills.com and bidorbuy.co.za.
Very informative post. I placed code about 6 days ago but not yet show search box in google result.
Hey Kiron
Thanks for your comment.
The code will not impact displaying of a search box within Google search result page. It only tells Google.com to direct to your search engine when a search box is presented and used for a site search. As to whether to display a search box or not, it was totally controlled by Google internal algorithm. You may check this link for an explanation: https://developers.google.com/webmasters/structured-data/slsb-overview
Good luck with your SEO.
Allen