Adding Your Blog as a Search Provider

In IE7, adding your own custom search is beautifully simple now that Microsoft have added the Create Your Own to the ‘Find More Providers…’ link in IE7

Create Your Own Search Provider screenshot

So, it seems sensible that your blog would want a piece of the action.

To that end, here’s a quick example of my own search provider. As IE7 uses the OpenSearch Specification, an XML document can be linked in your site which will make the search box glow. Users can then either use the search specification to carry out a search on the site, or additionally add the search to their list of search providers.

IE7 Search Bar in Vista

First of all, either create your XML file on Microsoft’s Add Search Providers page, or check out my XML file. The opens are documented on the website, I think that they are quite self explanatory.

Edit the XML file to include your site’s details and add any additional bits you’d like.

Upload the file to your website and then open the header.php file that your theme uses (or just your default webpage for non-Wordpress sites).

Within the < head> tag, add the following line (making the appropriate adjustments):

Now visit your website, and you should see that you can be added in Internet Explorer’s search list. If it doesn’t work, check that the XML file syntax is correct, and then restart Internet Explorer. After spending about 30 minutes trying to work out why my XML file wasn’t working, it turned out it was.

And now, if you click on the top right (you IE users, you!), then you’ll see bloggingIT in all its glory! Click on the Add Provider option, and you are greeted with:

Add Search Provider dialog

All users have to do now, is click ‘Add Provider’.

Non-intrusive and easy to use. Great!