Friday, June 19, 2015

Inform Google to Show Search Box In Search Results Under Your URL [UPDATED]
Did you ever saw search box in a search engine? Do you know how it comes? If no then- Google has a feature that displays site links and search box below your homepage's URL. It looks really cool to have it. Imagine- your blog's visitors can search directly from Google search results and Google will also show some attractive URLs from your blog which can help you in attracting more and more visitors from search engine plus, a search box from where, peoples can search what they want.

But now, the question is- How can you inform Google to show that search box for your blogger blog? So today, we are answering this question. We will not only tell you how to tell Google to show that search box for your blogger blog but also how to tell Google not to show search box for your blog (because sometimes, Google automatically shows it) and it's just a simple thing that can be done with a single line meta tag.

Also Read:- How to Customize Google Custom Search Engine Using CSS?

How to Enable it for Your Blogger Blog??

It's really easy! You just have to add a small chunk of JavaScript or a little chunk of MICRODATA in your template's head section.

Steps are following:
  • Go to Blogger Dashboard > Template > Edit HTML
  • We have two methods for finalizing the process of telling Google to show that search box for your blog. 
Note: - You have to do only any one method mentioned below.

Method #1- Using JSON-LD

Now, you will have to add this small chunk of code before '</head>' in your template:
<script type="application/ld+json">
  "@context": "",
  "@type": "WebSite",
  "url": "",
  "potentialAction": {
    "@type": "SearchAction",
    "target": "{search_term_string}",
    "query-input": "required name=search_term_string"
  • Change the highlighted URLs with your blog's URL and save your template.

Method #2- Using MICRODATA

This time, you will have to add a different chunk of code in your blog (that's why it is #2 method =P). Add this code in your template before '</head>':
<div itemscope itemtype="">
  <meta itemprop="url" content=""/>
  <form itemprop="potentialAction" itemscope itemtype="">
    <meta itemprop="target" content="{search_term_string}"/>
    <input itemprop="query-input" type="text" name="search_term_string" required/>
    <input type="submit"/>
  • Change the highlighted URLs with your blog's homepage URL and then save your template.
You're Done!

How to tell Google not to display Search Box of your blog?

Now, if you don't want Google to display search box for your blog (if you don't like it), then there is also a way by which you can tell Google that you don't want to display search box for your blog. And the way is:
  • Add this Meta Tag in your template before '</head>' or after '<head>' (after '<head>' is recommended):
<meta name="google" content="nositelinkssearchbox" />
Note:- Search box of your blog will get removed within some weeks (after Google crawl your blog again).

Final Words from Author

Actually, I had tested this Sitelinks on Blogger Guiders and got amazing results that's why I posted it here. Hope you loved it. And yeah, don't forget to share it on social media with your friends and family. If any problem occurs, please report it through comments. Thanks!