Add your search engine to the browser

There is a great new feature in both Internet Explorer 7 and Firefox 2, which will allow you to integrate your site search directly into the browser.

I have been surprised how little buzz the new Open Search functionality in the next generation of browsers has received. After all, the additional exposure it could provide websites is considerable.

The concept

Open Search is a very powerful concept but for the purposes of this post, I am just going to focus on what it can quickly and easily offer website owners.

At the most basic level, it allows you to easily add the search functionality from your site to the search box found in the top right of both IE 7 and Firefox 2. Although this search functionality is only available while visiting a site, it does give users the option to save your search engine to their browsers and even set it as the default if they wished.

How to add open search

At first, the documentation associated with implementing open search appears very complex. This is largely because Open Search is capable of doing a lot more than basic browser implementation. However, below I give you the absolute basics to get your search in the browsers search box.

Step One: Create a description

The description is a very simple piece of XML that tells the browser about your search engine. There is a lot more information you can pass across but this is the basics:

<?xml version="1.0" encoding="UTF-8" ?>
<OpenSearchDescription xmlns="">
<ShortName>Boagworld Search</ShortName>
<Description>Search for web site management advice.</Description>
<Image width="16" height="16" type="image/png">http://www.boagworld/favicon.ico</Image>
<Url type="text/html" template="{searchTerms}" />

Most of the above is hopefully self-explanatory. The most important bit is the URL template attribute. The simplest way of finding out what this is, is to search using the search box on your site. Once you have arrived at the search page, copy and paste the url into the above XML file and replace your search term with {search term}.

However, this will not necessarily work for your search engine. It will depend on the set up on your particular site. For example on boagworld, I had to strip out some of the other parameters being passed across. Other search engines might work in an entirely different way, in which case you will have to refer back to the open search documentation.

Once you have made the changes to your XML file upload it to your server. For this demo I saved it as search.xml and put it on my site’s root:

Step Two: Pointing to your description

The next step is to point the browser at search.xml when it loads your site. You can do this by simply adding one line of code into the header of your pages.

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

Rename the title and make sure the href is pointing at your uploaded description.

Once you open the page in either Internet Explorer 7 or Firefox 2 you should see your search engine listed under the search engine dropdown.

Related Post

Do you know your real value? As web designers we think our skills lie in the code we write or the interfaces we build. In truth that is not where our real value lies and if we don...
Developer Oriented Project Management As project managers we need to think about how developers work rather than expecting them to adapt to our mindset.
Is digital transformation in danger of crushing your I.T. team? Many I.T. departments are under impossible pressure. With ever more demanding needs and years of legacy and new tech, I.T. teams are looking for ways ...
  • I don’t claim to know much about Open Search, so feel free to point out where I’m wrong. I believe your search option appears in the search engines drop-down, but not as the default – you have to manually select it from the list. Is that correct?
    If so, I can understand why people aren’t horribly enthusiastic about Open Search – very few users will actually know the option is there. In most cases, wouldn’t it be far more convenient to just put a search box on your site that’s in plain view? Again, please let me know if I’m wrong here.
    I think that not showing your Open Search option as the default is the correct behaviour; after all, you don’t want to change your users’ search engine without their explicit consent. But I can see why people aren’t getting too excited about this.

  • I think you are kind of missing the point Steve. Yes you are right that the user has to “save” your search engine for it to remain in the list. However, I am not suggesting that you can remove the standard “in site” search. What I am saying is that with certain sites it will be useful for users to be able to search a site even when they are not at it. Yes you are correct that users arent always going to realise they can add it but there are ways around that such as the one used by google on their site. Sure this isnt useful for every site but for those that generate a lot of repeat traffic it is definately worth doing. After all it only takes a couple of minutes to set up

  • Hmm…I wonder if there is some way to aggregate these search boxes? EG, rather than having a Paul Boag search box and a Dan Cederholm search box and an Eric Meyers search box, could I somehow use my browser to combine the three into a single search box called “My favorite WebMonkeys?” That would be kinda cool. Nothing sucks more than having to search multiple sites!

  • That’s a pretty good idea, Steve. And actually, a savvy web developer could set that up and start a pretty cool web service. Select the places you want to search, hit “go”, and the service gives you a custom search destination to add to your browser search bar. When you choose it, instead of being submitted to the individual sites you’ve selected, it’s submitted to the web service, which gives you the results for your custom search widget, “My Favorite Web Monkies”.
    Nice article, Paul. Thanks for the info.

  • Ed

    Rollyo lets you select up to 25 sites to search at the same time.

  • Ed

    I’ve had a go and set up the
    my favorite webmonkeys search on Rollyo.

  • Nice. Look like you can add it to your firefox search bar, too.

  • I was having a play around with this all last night actually. Of course boagworld already has a swicki which is a bit like rollyo but your not limited to 25 sites. You can access it from our “web design resources” link. This searches loads of good web design sites and allows you to reorganise results on relevance etc. The only downside is that unlike Rollyo you cant just add it to firefox search. However with the help of this excellent search extension you can:
    This really is a superb extension and definately worth playing with.

  • Paul, you can’t modify that search widget to operate using the Open Search protocol?

  • Ed

    Now Yahoo have their own search builder tool!

  • I use an external company (Picosearch) to do our site search. I pointed them to your article and asked them to confirm the link we should use.
    When I tried this I get a parsing error on that link. Do you have any ideas on what might be going on? All I can think of is the “search term” bit might be something else, or that they do not like linking to external sites.
    BTW – Your text on your site says use {search term} while your code actually uses {searchTerms}.

  • Jr

    the yahoo search builder looks interesting. I might have to try that one also.

  • cool! have to integrate this feature on our site. thanks and a happy new year!

  • Paul,
    The above was cunningly disguised spam!

  • Promedia is born in 1997 and it is taken care endured of the greatest European plan on the high speed for the Tirrenia navigation, collaborating with ADV Labyrinth, in order to manage the advertising and promozionale plan on the entire national territory.
    Promedia is taken advantage of a professional organization
    integrated in order to make system in the service the enterprise.
    It faces in innovative way theCliente-Agenzia relationship, counts moreover, on an elastic structure that concur it to serve in the market, the small, medium enterprises and of great dimensions.
    Through our professionality, ‘ Publicity “is not more synonymous than spold, but means in order to create wealth.
    Promedia has realized experiences in several merceologici fields, with strategic tipologie of support considered for the companies, that they go from the market research on the products, to the realization of the coordinated image, to the realization of promotion and publicity plans.

  • Allen

    I really enjoyed this page. I will be linking and I will be trying to read and research all that there is to offer from this site! Would you please also visit my homepage?

  • Wallace

    Great looking site so far!! I’m just starting to look around it but I love the title page! Would you please also visit my site?

  • Shannon

    This site is very nise and helpfull! Please visit my site too:

  • Abanamat! In vina veritas! 119 Array

  • Abanamat! In vina veritas! 119 Array

  • Abanamat! In vina veritas! 119 Array

  • Abanamat! In vina veritas! 119 Array

  • Abanamat! In vina veritas! 119 Array

  • Abanamat! In vina veritas! 119 Array

  • p

    Can anyone recommend an open source search engine I could integrate into my site? I’ve gone half crazy trying to use Swish-e. Took 2 minutes to get it to run from command line, and 2 days NOT to work from my site. And… Breathe.
    Any suggestions would be greatly appreciated… Any!

  • sd


  • Hi there,
    man i just found out that the mozilla based browsers don’t use openSearch┬«
    they use their own xml type
    Open Search®:
    SparK Google
    SparK Google Scanner
    Mozilla® type:
    SparK Google
    SparK Google-Scanner

    It is a lot different but works!
    thnx for the link header command!

  • I actually managed to get opensearch to work in the end in both IE and Firefox browsers.
    Having had a load of difficulty with it though with the site search we use (provided by picosearch) I ended up using good old Googles search instead, and that worked with no problems.
    The code I used is: –
    In the HTML page
    Separate xml file (opensearchdescription.xml)
    BR Search
    Search for enclosures
    BR Enclosures
    Seems to work with no problems on a couple of sites.

  • The xml didn’t come through. Try this: –
    “I actually managed to get opensearch to work in the end in both IE and Firefox browsers.
    Having had a load of difficulty with it though with the site search we use (provided by picosearch) I ended up using good old Googles search instead, and that worked with no problems.
    The code I used is: –
    In the HTML page
    Separate xml file (opensearchdescription.xml)
    BR Search
    Search for enclosures
    BR Enclosures
    Seems to work with no problems on a couple of sites.”

  • Bugger, send smg and email at the domain name in the cade and I will send you the xml

  • Thanks.. Nice article, Paul. Thanks for the info.