Zit Seng's Blog

A Singaporean's technology and lifestyle blog

Chrome’s Press Tab To Search Your Website

You probably already know that you can do Google web search by typing keywords directly in the Chrome web browser’s address bar. The address bar is officially known as the Omnibox, and it can do other sorts of searches too. You can, for example, have searches sent to other search engines, or perform website-specific search queries.

Zit Seng's Blog on Retina MacBook Pro

This is sometimes referred to as the Press Tab To Search feature. Here’s how it works on my blog. Start typing a few letters of my website URL. You’ll notice that if Chrome can autocomplete the name, it will show the Press Tab to Search hint like below.


Press Tab. Then type a search keyword.


You’ll see how the left hand side changes to say Search ZitSeng.com: and, after you enter some text and then press Enter, you will be sent to the search engine results on my website based on those search keywords. Simple as that, it’s basically searching my website directly from Chrome’s omnibox (the address bar, in case you forgot).

It’s easy to enable your website to support this omnibox search feature. Put this in the header section of your webpages:

<link rel="search" type="application/opensearchdescription+xml" title="ZitSeng.com" href="/opensearch.xml" />

Then, create the file opensearch.xml in your website root (or wherever you have it named in the above link tag, with the following content:

<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
A Singaporean's technology and lifestyle blog
<Image width="16" height="16" type="image/x-icon">/favicon.ico</Image>
<Url type="text/html" method="get" template="https://zitseng.com/?s={searchTerms}"/>

Make any changes as you require. The important bit to interface with your website’s search engine is in the Url tag above. The example you see here works for WordPress.

Now once Chrome sees the OpenSearch header information, it’ll know how to send omnibox searches to your website.

There are WordPress plugins that can setup the omnibox search feature for you. But why bother with a plugin when all it takes is one file and a simple edit to your site header.

This is a pretty convenient feature for users to find content on your website, particularly when they know it’s specifically in your website that they want to search within. I often use it myself, not just for searching my own blog, but also on many other sites such as, say, Amazon or camelcamelcamel.

Leave a Reply

Your email address will not be published. Required fields are marked *

View Comment Policy