A couple of years ago, Google introduced the Sitelinks Searchbox. When activated, this search box appears under the main search result from a given brand. So after searching for the brand in Google, you can directly use the search engine of the online store or site where you want to look something up. The results will be presented on the search results page of the relevant site.
Adding a Sitelinks Searchbox to your site
It’s not that difficult to make your site eligible for a Sitelinks Searchbox. The process consists of just three steps, and if you are a Yoast SEO user, it is even easier. This process takes care of the technical side, but, in the end, Google determines if your site gets a Searchbox. So, let’s run through steps one to three:
1. Verify you have a functioning search engine
For 99.5% of WordPress sites, this one is simple: you type example.com/?s=query (replacing example.com with your site’s URL), and you should see search results. If you don’t see it, you’ve either made a conscious decision to move your search engine elsewhere, or you might need to fix your theme.
2. Add the necessary markup
Another very simple step, assuming that A, you found your search engine under step one and it’s the default WordPress one and B, you’re using our free or premium Yoast SEO plugin. If you use the latest version of our plugin, you’ve already got the code right on your site.
It could be that you don’t use the default search engine, in that case, you’ll need to change the URL using the built-in filter. If you don’t have a search engine, get one.
If you don’t use Yoast SEO, you can add the necessary code by hand via an individual block of Schema.org code for structured data. Here’s a piece of example code from Google’s documentation, in this same document you’ll also find the requirements for a valid technical implementation. This uses JSON-LD to mark up the code in an efficient and readable way.
3. Set up a preferred canonical URL for your homepage
Step three, and yet again, this one’s easy. When you use Yoast SEO, this has already been done for you. However, if you don’t have it installed, you’ll realize after reading this article that now is as good a time as any to install it. If you want – or need – to do it by hand, you can read up on canonical URL’s in our ultimate guide to rel=canonical.
When you have done all of this and Google deems your site eligible, you might eventually see something like the example above in the search results.
As said before, it is not too hard to get your site ready for a Sitelinks Searchbox. If you use our Yoast SEO plugin, the necessary code is already built in. Now you just have to wait and see if Google deems your site eligible and shows a search box.