April 19, 2015

How to Display Search Box in Sitelinks Of Google Search Results

Most of you know that Google search has introduced a new feature to its search results where you can directly enter your search query without even opening the website. This was a very good update which enabled the users to browse through the sites, there by improving the user experience. When you want to specifically go to a website and search for content, you either directly type the URL of the site or just type the name and search it in Google. So whenever you search it in Google, you will be able to see a search box below the site name, where you can directly enter the query you wanted to search in the website instead of opening the website and then searching for it. This will make the user save time and improve their browsing experience. You can see different Schema for news websites like All India RoundUp and other popular news portals.

For example, search for Moz in Google and you will find this:

example moz

example moz1

Another good part of this feature is that, it refines the search and shows only those suggestions which are relevant to that particular website which you want to browse in.

Two ways to get sitelinks search box

I would say there are basically two ways to get sitelinks search box for your website in Google search results:

1. Build your website as a brand and make it very popular. Google automatically considers such sites and show sitelink search box in its search results. For example, sites like Flipkart, Buzzfeed, Scoopwhoop etc.

2. This is much easier way to do it where you can implement certain tags and code to make Google show the sitelink search box in its search results.

Difference between the two ways:

There is a slight difference in the way Google interprets the sitelinks search box when we compare both the above mentioned ways:

1. When Google automatically considers to show the search box of your site, then the search results are shown in Google search itself, with the keyword and site: tag. For example, try it on Flipkart or Buzzfeed, and this is what you can see.

buzzfeed example

buzzfeed result example

2. When we manually include some code and tags into our website to make Google show the sitelink search box, then the results are not directly shown in Google search, but are shown in the website search results page. For example, consider Snapdeal site.

snapdeal example

snapdeal result example

How to implement the Sitelink Search Box on your website:

Let us now jump to the method where we can include some schema codes and tags to enable the sitelink search box for your website in Google search results. As I already said, it is very easy and you just need to understand a small bit of code.

#1. Understand you internal site search engine

Firstly, you need to make sure that you have an internal site search engine which is active and effective. Most of the Wordpress sites generally have it already enabled.

Now you need to understand the way your internal search works, the search terms and the search URLs. When ever you type something in your search box, you will land on a page where you find the results. This page has a particular type of URL which ends with “?Search=query” or “?s=query” or anything depending upon the search tool you are using. So you need to identify this structure.

The structure of search query URL in Alltechbuzz is something like this:



 #2. Add SearchAction Schema to your website Homepage

Here is the code which you need to add to your website homepage:

<script type="application/ld+json">
   "@context": "http://schema.org",
   "@type": "WebSite",
   "url": "https://www.example-alltechbuzz.net/",
   "potentialAction": {
     "@type": "SearchAction",
     "target": "https://query.example-alltechbuzz.net/?s={search_term}",
     "query-input": "required name=search_term"

Before directly pasting it on to your site, understand the code first. There are specific things which you need to change in the code in order to make it work.

  • “url”: This specifies the URL of your website. So change it to your website URL.
  • “potentialAction:target”: This specifies the internal site search URL structure which we determined in the first step. It is important to change this according to your site search structure in order to make it functional.

Once you are done with these two simple steps, you will have to just wait for Google to crawl through. That’s it!

Another way to get Sitelink Search Box for Wordpress Sites:

The above mentioned steps is one way using which you can get the sitelink search box in Google search results for sites on any platform. But as you know, Wordpress makes our work much easier, here is another simple way to do it.

Sitelinks Search Box Plugin For Wordpress:

sitelinks search box plugin

This is a simple plugin which combines all the above steps into one single step. Just install the plugin and make it active. The plugin doesn’t need any additional configuration either!

Changed your mind? You can Opt-Out! (Disable Sitelink Search Box)

If you do not want Google to display sitelink search box in its search results, then you have an option to opt-out as well! This can be done by simple placing a meta tag in your website.

<meta name="google" content="nositelinkssearchbox">

About the author 

Imran Uddin

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}