Of the many wonderful features I enjoy in the Mozilla Firefox browser, the feature to automatically perform a Google “I’m feeling lucky” search whenever I accidentally type a bad URL or keyword into the address bar isn’t one of them.

The feature in question is Firefox’s default behavior to replace the word or words it finds in the address bar with the URL

http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=[address bar text]

when what you type in the address bar doesn’t look like a valid URL or one of the “Quick Search” bookmark keywords. I really like the keyword search feature. I’m constantly typing _goo _ into the Firefox address bar to perform a fast Google search. Firefox comes predefined with a Google search keyword as one of the “Quick Search” bookmarks. (I shortened the default “google” keyword for simplicity.) Firefox also comes with predefined keywords to search Wikipedia (wp), an online dictionary (dict), a stock-price lookup (quote), etc.

The problem with Firefox’s automatic “I’m feeling lucky” search arises when I mistype one of my keyword searches. For instance, if my Yahoo keyword search is “yah” but I accidentally type

ya spring mvc

instead of performing a Yahoo search for sites talking about Spring‘s MVC web framework, I end up, for instance, at one of the Spring forum pages that happens to have the word “ya’ll” in it. Google’s “I’m feeling lucky” search thinks that’s the page I want because it has the words ya, spring, and mvc. (We can leave aside for now whether ya’ll is a word.)

Since I don’t usually want Google to select a search-result page for me, I don’t often use its “I’m feeling lucky” search. Except, that is, when I have a typo in my Firefox URL or keyword search on new installations of Firefox before I disable the automatic search feature.

Here’s how to tell Firefox not to perform an “I’m feeling lucky” search whenever it doesn’t understand the address you type in:

  1. Put your cursor into the Firefox address bar (Ctrl-L is a fast way)
  2. Type about:config
  3. In the Filter text box, type “keyword” and hit Enter or wait a second. You’ll see a line that says:</p> <pre>keyword.enabled default boolean true

</pre>

  1. Double click on this line. The line will become bold and the value will change from true to false to indicate the feature is now turned off.
  2. You’re done

Now, whenever you type the wrong keyword or a bad URL into Firefox, you’ll see an Alert box that says the URL is not valid and cannot be loaded. To me, that’s what I’d expect Firefox to do rather than take me to some semi-random, unexpected page.

After you type the “about:config” and filter the results to the “keyword” configuration settings, you’ll also see the “keyword.URL” preference setting. That’s the URL Firefox uses to take you to the “I’m feeling lucky” Google search. If you like the Firefox auto-search feature but want to change the search URL, you can change the value by right-clicking on the line and selecting “Modify.”

This level of configurability in Firefox is one of those features I really like. Instead of the typical software attitude of, “You don’t like our default behavior? Tough!” Firefox lets you change many preferences to suit your own likes and dislikes.