ptheofan
ptheofan

Reputation: 2270

search input in google search results page

If you google for IMDB, you'll notice that after the sitelinks (the list under the page title) you get a search box. If you type in there the form content is submitted to the search of imdb which in turn returns the results within the imdb site (see screenshot). site search input on google search page http://imageshack.us/a/img593/3320/googlesearchwidget.png

Question is, how can one add this feature?

Also, with some sites on some browsers (i.e. chrome) when you type the domain and hit tab you get a nice Search domain.tld: and anything you type after that is sent to the website's search page (again see second screenshot)

browser site search trick http://imageshack.us/a/img203/1696/chromesitesearch.png

Second question (somehow I get the feeling these two relate) how do I do that on my website?

Upvotes: 6

Views: 2418

Answers (3)

Jalil Khan
Jalil Khan

Reputation: 184

This is the google official tutorial that how to improved search box within the search results.

Upvotes: 3

Hossein
Hossein

Reputation: 4549

For your second question:

You can use OpenSearch technology. You should create a XML file.

  1. The XML file should look something like the following:

    <?xml version="1.0" encoding="UTF-8"?>
    <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
    <ShortName>TITLE OF YOUR SITE</ShortName>
    <Description>DESCRIPTION</Description>
    <InputEncoding>UTF-8</InputEncoding>
    <Url type="text/html" method="get" template="http://www.YOURSITE.com/?SEARCH_QUERY={searchTerms}"/>
    </OpenSearchDescription>
    
  2. Reference the XML file in html code:

    <link href="/opensearch.xml" rel="search" type="application/opensearchdescription+xml">
    

For more information

I hope Google add search box for your site.

Upvotes: 2

metadice
metadice

Reputation: 359

For your first question...

It's 50% Google's job and 50% ours(SEOs). Displaying search box in Google serps is in the hands of Google. Google does this by analyzing which are the most important assets(or the function) of your site/page. How much powerful they are in terms of search engine rankings. e.g.

Wikipedia's one of the most important asset and functionality is the search functionality. It is most likely that people upon visiting the site will use the search box for searching some information. So Google can display a search box in serps.

That was the Google's 50% now for ours If you want to achieve this for your own site than it's a lot of work in terms of SEO. Start optimizing your site for search engines and if you run into any problem ask here on SO.

Now for your second question...

Now-a-days browsers like Chrome etc. embed their search functionality right into the address bar. Chrome embeds google search in it's address bar(as it is google's own browser) so when you start typing something you instantly start getting suggestions and on pressing tab your search is redirected to that particular domain.

Upvotes: 2

Related Questions