Add Firefox 1.5 Style Google Search to Firefox 2 Address Bar


Type a query inside Firefox 1.5 address bar and hit enter, the browser would automatically take you to the website that appears as the top result in Google for that query. It's like pressing the I'm feeling lucky button.

Unfortunately, Firefox 1.5 users who have migrated to Firefox 2 will miss the above feature. For some unknown reasons, Mozilla removed this feature from Firefox 2 and now if you type any query with spaces in the Firefox 2 address bar, it throws up some Invalid URL error.

This is because, in Firefox 2.0, the default has been changed to use Google's "Browse by Name" service that would you noticed in the Google Toolbar. So here's a simple fix that will make Firefox 2 address bar behave like that of Firefox 1.5.

Step 1: Type about:config in the Firefox 2 address bar and hit enter.

Step 2: In the Filter text box, type keyword.URL and again hit enter.

Step 3: Double Click the keyword.url line and a popup dialog will appear asking you to input a new value. Just copy-paste any one of the following values depending on your requirement:

a. Show the standard Google search results page

http://www.google.com/search?btnG=Google+Search&q=

b. Perform a "I'm Feeling Lucky" search and directly open the first result of that search.

http://www.google.com/search?btnI=I%27m+Feeling+Lucky&q=

c. Change the settings back to the default search behavior of Firefox 2

http://www.google.com/search?sourceid=navclient&gfns=1&q=

d. Use Yahoo Search instead of Google Search

http://search.yahoo.com/search?q=

Remember that this Keyword.url preference only has an effect when keyword.enabled is set to true.

Related: Firefox 2 like IE 7, Invalid URL in Firefox

Reader Comments

doesn't work, still gives the bad url error. I did exit and restart firefox.

doesn't work for me. Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1) Gecko/20060601 Firefox/2.0 (Ubuntu-edgy)

Doesn't work for me either.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0 Mnenhy/0.7.4.666

Useful since I want to modify it not to use I'm Feeling Lucky but a default google search.

Though I never noticed the problem in FF2.0, and I updated to 2.0.0.1 recently and didn't notice a problem now. Works fine for me, without the hack.

Amit,

Using this fix works only with single words, and nothing more. For example, after changing the keyword.url to "I'm feeling lucky", I put down 'digital inspiration' into the address bar and it gave me the same invalid url error. Typing 'digital', on the other hand, took me to digital.com. Is there a fix for this?

It works provided you type in two or more words. If you type in just one word, it assumes your attempting to use an http URL e.g. "bob" becomes http://bob. I think this is a Firefox hack because http URL's will never have spaces, so if there is only one word (no spaces), firefox assumes your typing in a domain, eg. www.bob.com. Just a theory...

Thank you, it worked great. Interesting site you've got here, too.

everyone who says it isn't working: clear your cache. Q.E.D.

thanks.luckily i found this after installing megaupload it changed to yahoo and it was more troublesome.

Thanks a ton. I waste like almost a whole day changing back to Google setting after installing Megaupload.

Thank you so so much! You are a life saver! I coulda cried when this wasn't working! It was one of my favorite things about Firefox.

Add my blog to Google Reader or iGoogle Subscribe to my YouTube Channel Subscribe to my RSS Feed Follow me on Twitter Like my Facebook Page