Adding SharePoint Site as a Search Provider in Internet Explorer

AddSearchProvider was introduced in Windows Internet Explorer 7.

This method opens a dialog box that enables the user to add the provider to their registry, and optionally set it as the default search provider. The maximum number of search providers that can be installed is 200.

The sUrl parameter allows http:, https:, or ftp: protocol schemes only. Additionally, the URL must be in a security zone that permits downloading.

Search providers must use the HTTP GET request method; the POST request method is not supported.

Syntax of “Provider.xml” must be of valid XML format. Be sure to encode all characters in the query string. Particularly, escaping “&” to “&”.

The query string must contain “q={searchTerms}” somewhere within the query string. When Internet Explorer 8 navigates to the provider to get search results, “{searchTerms}” will be replaced by the query string that the user typed into the Instant Search box.

To add SharePoint Search Site as a Search Provider in Internet Explorer such bing or google we have to user the below syntax


Here sUrl is a string that specifies an absolute or relative URL to the OpenSearch Description file for the search provider.

The following code will add the search provider on click of the button

<INPUT TYPE=”button” VALUE=”SPRIDER Search Provider”   onClick=’window.external.AddSearchProvider(“/_layouts/15/SPRIDER/XML/SPRIDER_IE_Provider.xml”);’>

This can be advertised automatically by embedding this file on the master page or webpart zone with the help of CEWP as shown below

<link title=”My Provider Name” rel=”search” type=”application/opensearchdescription+xml” href=”(“/_layouts/15/SPRIDER/XML/SPRIDER_IE_Provider.xml”>

Sample OpenSearch Description file content

<?xml version=”1.0″ encoding=”UTF-8″?>

<OpenSearchDescription xmlns=””&gt;

<ShortName>SPRIDER Search </ShortName>

<Description> SPRIDER Search provider for Internet Explorer</Description>


<Url type=”text/html” template=”http://sprider/Pages/results.aspx?k={searchTerms}”/>

<Url type=”application/x-suggestions+xml” template=”http:// sprider/_layouts/15/amat/SuggestionProvider.aspx?k={searchTerms}”/>

<Image height=”16″ width=”16″ type=”image/x-icon”>http://sprider/_layouts/15/SPRIDER/Images/spriderfavicon.ico</Image&gt;


Here I have used the customized Suggestion response page (SuggestionProvider.aspx) to send empty response message when no suggestions found.