Enhance your site search with OpenSearch

  Wynn Netherland • 2010-02-15

If your web site provides its own search function, set up OpenSearch to let your users search from the browser search box.

With two simple steps you can let users hit your site's search page without forcing them to visit first.

First, create an OpenSearch definition.

<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>Wynn Netherland</ShortName>
<Description>Designer &amp; Developer</Description>
<Contact>wynn@orrka.com</Contact>
<Image height="16" width="16" type="image/x-icon">http://wynnnetherland.com/favicon.ico</Image>
<Url type="text/html" method="get" template="http://wynnnetherland.com/?s={searchTerms}"/>
<moz:SearchForm>http://wynnnetherland.com</moz:SearchForm>
</OpenSearchDescription>

Next, reference your search definition in your page layout.

<link rel="search" type="application/opensearchdescription+xml" href="http://wynnnetherland.com/opensearch.xml" title="Wynn Netherland" />
Wynn Netherland
Wynn Netherland

Engineering Director at Adobe Creative Cloud, team builder, DFW GraphQL meetup organizer, platform nerd, author, and Jesus follower.