How To Setup Google Sitelink Search

Recently Google launched the mark-up that you need to get the site-link search working for your branded SERP results. The site link box shows on any branded search result and displays a search box in the SERPS that allows users to search your site, in Google’s words “removing a step from the process”.

Amazon Site Search

Now there are two ways that we have seen these to work, I believe that the reason they work in 2 different ways is due to them not being setup correctly. I have listed the 2 examples below;

1) Amazon – When you search Amazon in Google you are greeted with an Amazon search box, enter a search query in this search box and you are taken to an Amazon result page.

2) ASOS – When you search Asos in Google you are again greeted with an Asos search box, however this time when you enter a search query you are taken to a site search result on Google. This is bad for a number of reasons, one being mention in this blog post by AJ Kohn.


How To Setup

There is official documentation for setting up the site search on the Google Developers website that will run through some of the information and steps but I have simplified it below;



The sections that you will need to change on the above codes are the following;
url: Set this as the homepage to your website.
target: This needs to be the search result page on your website.

This code only needs to be placed on the homepage of your website and will not need to be replicated throughout the site.

You also have the ability to remove stop Google from using Sitelink Search on your listings, all you need to do is add the following meta tag;

  • Jake

    Hi Kieran,

    Will this allow you to use the search function within your website, for instance WordPress search. how do you get it to perform like amazon does with it displaying results on your website.

    Thanks Jake

    • SEOCandy

      Hey Jake,

      This will allow you to use it within your own website, like Amazon does. Just ensure that you update the target and url options in the code to the correct pages, and Google will send users to your site instead of showing the results in a site: query. Hope this helps.


  • Does this work on wordpress ?

    • SEOCandy

      Hey Phill,

      Sure it can be added to WordPress, we have it running on this site, it is automatically put in if you use Yoast’s SEO Plugin or you can add it manually just ensure you set the correct target page for wordpress;

      “@context”: “”,
      “@type”: “WebSite”,
      “url”: “”,
      “potentialAction”: { “@type”: “SearchAction”,
      “target”: “{search_term}”,
      “query-input”: “required name=search_term” }

      • drzmbs

        how can add by Yoast’s SEO plugin

        • SEOCandy

          Hi drzmbs

          This is automatically added if you are using Yoast’s SEO Plugin.

      • Naveed

        Add this function.php

        fixed this problem

        add_filter( ‘wpseo_json_ld_output’, ‘__return_false’ );

  • Hydi

    Nice Article, but im new to this platform just want to know do we need to add both codes like JSON LD and also Mirodata on the homepage of site.

    Or else its fine with one type of code we can add on homepage

    • SEOCandy

      Hi Hydi,

      Thanks for the comment, You only need to add one of the codes onto the homepage you can choose between JSON LD or Microdata.


  • I see you are implementing JSON LD method on your homepage, like I did :D. But when I search your website (or mine) on Google, it still doesn’t show me the search box like Amazon or Youtube. How to make sure we are doing the right thing?

    • SEOCandy

      Hi Hitoriki

      Thanks for the comment, once you have implemented the code it is up to Google to choose when to show the search box there is no quick fix for this part I am afraid.

  • Hi Kieran, great advice 🙂 The search result page i am trying to do this on isn’t as standard as most websites. Its a bit higglety pigglety. Do you think it would still work with a url search structure like below?


    Example search term is blue widgets


  • Hmmm its striped example url. I have taken a screen grab of the url. It can viewed on the below link.

    Thanks again

    • Hi Gavelect,

      In that case I would put your URL into the “target”: on the JSONLD example so it would read &SS={search_term_string} and then your string would continue if that makes sense?

  • lena

    i use yoast plugin, but i want yo remove the

    how can i achieve this?


  • Amichay Rab

    https does not lead to any page on my website. Can I use http instead of https?

    • Hey Amichay,

      You can use any protocol that you need so either http:// or https://, https:// was only used as an example.


  • usm business Systems

    I have updated it to my website.when will it be visible in search results??

  • sruthi cutie

    I have updated in my website.when it will be visible in search results??

  • shyam

    From where those words in autocomplete of sitelinks search box getting binded?
    Is that possible to add words on my own ?

  • Where i put – Within Head Section or Body or Footer Section ?????