How to Create a Web Link to Add a Custom Search Provider

Google Sniper

Search Engine Traffic Guide

Get Instant Access

You can publish a link on a Web page to allow users to add a custom search engine . First, create an OpenSearch 1.1 Extensible Markup Language (XML) file that describes your search engine . For example, the following XML file describes a search engine that can be used to search the Microsoft . com Web site.

<?xml version="1.0" encoding="UTF-8" ?>

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Microsoft.com</ShortName> <Description>Microsoft.com provider</Description> <InputEncoding>UTF-8</InputEncoding>

<Url type="text/html"

template="http://search.microsoft.com/results.aspx?q={searchTerms}" /> </OpenSearchDescription>

To create your own OpenSearch XML document, simply replace the template attribute in the <URL> element with the URL of your search engine, inserting {searchTerms} at the location in the URL where search terms appear.

NOTE For detailed information about OpenSearch documents, visit http://www.opensearch.org/home.

After you create an OpenSearch XML document, you can allow users to add it from a Web page by using a window, external. AddSearchProvider("<URL>") call within a link. When users click the link, they will be prompted to add the search engine . The following example demonstrates the required HTML. (You must replace "<URL>" with the location of your OpenSearch XML document.)

onClick="window.external.AddSearchProvider(&quot;<URL>&quot;);">Add Search Engine

Was this article helpful?

0 0
SEO Article Copywriting

SEO Article Copywriting

Ghost Writing and Its Link to Internet Marketing. From 1996 to 2000, SEO copywriting was still not formulated. To optimize Websites, operators and owners had just needed to formulate and create Meta tags or titles and submit the tags and the whole Website to directories and search engines so that search listing would include the Website.

Get My Free Ebook


Post a comment