How to Add OpenSearch to your Website or Blog

February 15, 2007 2 min read

The latest versions of Microsoft Internet Explorer and FireFox offer a powerful new feature: they allow you to run a search directly from the browser without having to open a Google or Yahoo page. This is handy and convenient, and can save us a few clicks for every search we run (several per day, in my case).

The new feature is based on an open standard called OpenSearch. It’s based on a simple yet effective idea:

  1. A website owner adds a little XML file to his/her website and a simple tag (auto-discovery link) to the main web pages describing a new search engine or a specific search option for an existing search engine.
  2. As new generation web browsers visit the website, they automatically recognize the tag and load the XML file.
  3. The XML file is parsed and, if syntactically correct, a new entry is temporarily added as an option to the search menu of the web browser.
  4. The visitor/user can customize the web browser adding the new search option as a permanent entry of the search menu.

It’s very simple. If you don’t have a new search engine running on your servers, you can set up the OpenSearch configuration to run a search on your website using Google as the search engine.

First you have to create the simple XML file. I suggest you start from a template. The one I use is below (thanks to DeWitt Clinton):

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>[Site Name]</ShortName>
<Description>Use Google to search [Site Name]</Description>
<Tags>[Site Name]</Tags>
<Url type="text/html" template="http://www.google.com/search?q=site:[Site URL] {searchTerms}"/>
</OpenSearchDescription>

Now you have to replace [Site Name] with your website name and [Site URL] with your website URL. Here is the Novedge XML file:

<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Search Novedge</ShortName>
<Description>Use Google to Search NOVEDGE</Description>
<Tags>NOVEDGE</Tags>
<Url type="text/html" template="http://www.google.com/search?q=site:novedge.com {searchTerms}"/>
</OpenSearchDescription>

Save the XML file with the .xmlextension, and copy it onto your website. Now you only need to add a simple tag to the HEAD section of your web pages. This is the template of this auto-discovery link:

<link rel="search" href="[XML File URL]" type="application/opensearchdescription+xml" title="[Site Name]" />

For example, here is the Novedge auto-discovery link:

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

Now you’re done! Refresh your browser and then check it. Here is what you should see (FireFox):

From now on all your visitors will have the choice to add a search to your website as a standard option of their web browser. At Novedge, for example, we believe this is important. We have a huge catalog with more than 1500 products so we’d love to make our catalog searchable through Google.
You can try OpenSearch on our Novedge website.  If you decide to add this feature to your website let me know by leaving a comment to this post. For more details about OpenSearch, please visit the OpenSearch pages on Wikipedia or the OpenSearch website.

Franco Folini

Franco Folini
Franco Folini


Leave a comment

Comments will be approved before showing up.

Also in NOVEDGE Blog

Shape The World With The Best Industrial Design Tools

September 21, 2020 1 min read

Industrial Design shapes our world making our life easier.  And while designers impact our lives, the right 3D design tools will impact theirs.
Read More
Empower Your Designs With Inspire Studio 90-Day FREE Trial
Empower Your Designs With Inspire Studio 90-Day FREE Trial

September 14, 2020 1 min read

Altair Inspire Studio is the new solution for innovative designers, architects, and digital artists to create, evaluate and visualize designs faster than ever before. 
Read More
Making Real-Time Render Real Simple:  Creating High-Quality Render with Enscape
Making Real-Time Render Real Simple: Creating High-Quality Render with Enscape

September 12, 2020 4 min read

Enscape offers a simple, seamless way to create visualizations and virtual reality experiences and integrates directly with Revit, SketchUp, Rhino, Vectorworks and ArchiCAD
Read More

Subscribe