OpenSearch, how to get Google Chrome to search your site.

Ever wonder how sites like support things like this in Google Chrome?

Well I did, so I did a little bit of digging. It turns out Google Chrome supports an open standard called Open Search. This format is relatively simple, and very easy to add to your own site. I just added it to some of our systems in under 5 minutes.

Adding OpenSearch to your site is incredibly simple, you just have to add a simple tag to your index HTML page, and add a simple XML file that it points to. The link tag looks like this:

<link rel="search" type="application/opensearchdescription+xml" href="" title="MySite Search" />

The opensearch.xml file looks something like this:

<OpenSearchDescription xmlns="" xmlns:moz="">
   <ShortName>My Site</ShortName>
   <Description>Search My Site</Description>
   <Url type="text/html" method="get" template="{searchTerms}"/>
   <Image height="16" width="16" type="image/">
   <Url type="application/opensearchdescription+xml" rel="self" template=""/>

And that's all, the first time someone visits your site, the link tag will be registered, and following attempts to type in that URL will provide them with the option to search (chrome), and it will nicely integrate with other search services as well.



The A9 spec is not functioning anymore.
What we will do?


Thanks a lot for help!
AndrewBassett said…
Good day! This is sort of off topic but I need some advice from an established post. Can it be tough to set up your personal post? I'm not very techincal but I can figure things out pretty quick. I'm contemplating setting up my very own but I'm uncertain where you should start. Are you experiencing any ideas or suggestions? Thanks Air Ambulance
Unknown said…
I can't see any reference to rel="search" or "opensource" or anything of the sort on, yet Chrome somehow detects the search on that site. So there must be one more way that this works, even if it's Chrome having a giant hard-coded list of sites and where their search URLs are.
Qasim Khan said…
i really love your post, thanks for sharing Attitude Poetry