Search Any Website From Within Firefox Address Bar

Posted on August 11th, 2008 at 5:28 pm by Keshav

6


The latest version of Firefox, Firefox 3, brought about more than 15,000 improvements and improved security & stability. With these improvements, it also brought about a new kind of address bar, now-a-days usally called as the awesome bar. But one feature which has been there in Firefox since the first version is called keywords.

image credit:coalbiter

Keywords in firefox allow us to open or search any website very easily. Let us learn how to use them efficiently.

A keywords is like a shortcut to a website. To try this feature, type google apple in the address bar and hit enter. Firefox will take you to a google search of apple. This was a predefined keyword meant to search google.

Predefined Keyword include:

  • google - Google Search
  • dict - Dictionary look up
  • quote - Google Search with stocks: operator
  • wp - Wikipedia
  • slang - Urban (slang) dictionary look up

Want to search Wikipedia from the address bar? Just type wp search-term This way you can use all the keywords.

Create your own keywords for opening and searching any site:

Take for example, you want to set a keyword for Lifehacker.com, go to their site and look for the search box. Then right click in the search area and select Add a keyword for this search.

A dialog box will appear. Enter name as Lifehacker and keyword as lh (this can be your choice, you can also keep it as a single L). Click Ok. Now if you want to search Lifehacker.com, just go to the address bar and type lh search-term

Actually, all the search boxes have a url associated with them. Now if u simply go and type google and hit enter, you will be taken to the google homepage. Just because you did not give a search term. When you add the google search as a keyword, the url provided is http://www.google.com/search?q=%s
When you use the keyword with this search, %s value gets changed for the search term. Similarly, it happens with other sites too. So, keywords can be used as a shortcut to open websites and search them at the same time. It is not always true that you will be redirected to the homepage if no keyword is provided (try for lifehacker’s lh term) If you want to set a keyword for the site only, make sure the url associated with the keyword is of the homepage and not the search.

If you want to search different website, this table will help you with search urls of different websites [source]

keyword location description
g http://www.google.com/search?q=%s Google Web search
gs http://www.google.com/search?q=site%3A%s Google site:
gl http://www.google.com/search?q=link%3A%s Google link:
s http://scholar.google.com/scholar?q=%s Google Scholar
img http://images.google.com/images?safe=off&q=%s Google Images search
usenet http://groups.google.com/groups?q=%s Google Groups search
id http://groups.google.com/groups?selm=%s&output=gplain Google Groups search
f http://froogle.google.com/froogle?q=%s&scoring=p Froogle
dict http://dictionary.reference.com/search?q=%s Dictionary
wiki http://en.wikipedia.org/wiki/Special:Search?search=%s Wikipedia
cpan http://search.cpan.org/search?mode=all&query=%s CPAN
fm http://freshmeat.net/search/?mode=all&q=%s Freshmeat

If you want to make or edit a keyword, open the bookmarks library of firefox, select the bookmark you want to edit, click the ‘more’ button underneath and add or remove keywords. Or Create a new bookmark, enter the url (either the above one or your own), the name and the keyword and it’s done.

Another way of searching any website, (doesn’t matter if it has a search box or not), is to use the search box in firefox:

search-term site:example.com

Use the above code in the google/yahoo search box and hit enter. I hope this post will help you in searching more quickly and efficiently.

Tip: Use short keywords such as g for google. Then you can press Ctrl+L for focussing and highlighting all the text in the address bar, then enter your keyword and search term and press Alt+Enter for opening the search page in a new tab!

You might want to check out these related entries: