Turn off domain guessing and keyword search in Firefox

For security and ease of troubleshooting, turn off Firefox's automatic keyword search and domain guessing features.

Problem
Firefox has an annoying habit of trying to guess what address you meant to go to when you type in an invalid URL. There are two components: domain guessing, which attempts to correct an invalid domain name, and keyword search, which searches Google for what you typed and silently takes you to the first search result. Domain guessing and keyword search can potentially reveal private information and expose you to malicious websites. If you really want keyword search, use the built-in search bar, which is to the right of the address bar in the default Firefox installation.
Solution

The following instructions will walk you through turning off two features of Firefox. These features may be re-enabled at any time by the same process. All of the settings can always be reset to their default value.

  1. Go to the address about:config, which will allow you to tweak the browser's settings.
  2. Type fixup in the filter bar at the top of the page to narrow down the list of options.
  3. Toggle the entry browser.fixup.alternate.enabled to false by double-clicking it.
  4. Clear the filter bar and type keyword in its place.
  5. Toggle the entry keyword.enabled to false the same way.
  6. Close the about:config tab or window. You're done!
Explanation

Domain guessing and keyword search are well-intentioned features, but they ultimately cause more trouble than they are worth. By silently redirecting the user to a search result, the browser may cause confusion and danger. I'll give an example that I was involved in:

  1. I send the instant message
    get ready for a big image link
    http://flickr.com/photo_zoom.gne?id=85689163&size=o
    to a friend.
  2. She accidentally pasted the full message into the address bar of Firefox.
  3. Firefox read the new-line character after the word "link" as a press of the [Enter] key (this is normal behavior), thus ignoring the link itself.
  4. Since "get ready for a big image link" is not a valid URL and doesn't look like a mis-typed domain name (which would prompt domain guessing), Firefox initiated a Google "I'm Feeling Lucky" search for the phrase, which redirected my friend to a NASA page about icebergs. She never saw a Google search page, and assumed that I had intended to send her to a page about icebergs, rather than a page relevant to our discussion.

This is a harmless example, but it is not a stretch of the imagination to say that this could be exploited maliciously.

Resources

Responses: 22 so far

  1. Jeremy Stein says:

    You probably also want to turn off keyword.enabled

  2. Tim McCormack says:

    @Jeremy: That's already mentioned in step 5.

  3. Andrew says:

    this doesn't work.

  4. Tim McCormack says:

    @Andrew: Work with me! What version of Firefox are you using? Can you give me an example of what you typed, and what happened?

  5. Martin says:

    Thanks for this, it get's frigging annoying when your browser second guesses you, especially when it can cause trouble as you detailed above. If I want to google something, I'll search for it on #*#**# Google!

  6. Jeff says:

    Great tutorial! Thanks! I agree with Martin...

  7. Cambo says:

    Thanks. Great. I really needed this.

  8. Required says:

    Thanks for this info (came up through a scroogle search).

    Works fine on 3.5.5 here. Slightly disconcerting security risk as a malformed URL I was working with here effectively sent info to a completely wrong (browser guessed) domain.

  9. Nezelodo says:

    Very good hint, thanks a lot :)

  10. Suzy says:

    If you have domain guessing, you obviously cannot go to "about.config" because the computer will automatically try to take you to http://www.about.config, which doesn't work. Telling someone who wants to disable domain guessing to go to about.config is like telling a thirsty person in the desert to "first, go get some water." If anyone can figure this one out, please post the answer. Thanks.

  11. Tim McCormack says:

    Suzy: It's not "about dot config", it's "about colon config".

  12. loopduplicate says:

    When I type in the whole address including "www" it still searches. For example:

    http://www.swearingisfun.net is a website I used to go to years ago and I typed that into the address bar. I started using the internet in 1995 and you had to type the whole address back then and I still do because I'm a nerd and I think it's fun. Well, when I did that, I found out the website is no longer there and my internet provider, Comcast, somehow searched for me and gave me the results from Yahoo. Do you think that this is something that I can stop on my end or do I have to call my ISP? Or maybe just stop typing in the whole URL? I love typing in http://www though. It's like playing a song.

    Also, does anyone know how to always show the headers in Thunderbird? I don't like it cleaned up, I like looking at the code. I don't want to have to type ctrl+U every time.

  13. Tim McCormack says:

    @loopduplicate: Comcast's DNS is not returning NXDOMAIN but instead returning the IP of a search server and showing you a branded, ad-full search page. It's extremely shitty of them to do so. (For one, it screws with at least one anti-spam measure. It's also really irritating for developers.) You can change your router and/or computer DNS to 4.2.2.2 and 8.8.8.8 if you'd like, assuming Comcast doesn't outright *intercept* those.

    As for Thunderbird, that's beyond the scope of this discussion, but there is an option in the menus.

  14. Rol Murrow says:

    I followed the suggestions above but am still having the same problems:

    In particular if in FireFox I put http://www.sci.scientific-direct.net in as a URL, which is apparently bad, I get initially http://www.web-help-service.com, which then immediately redirects me to http://searchassist.teoma.com/landing.jsf ... etc.

    I can find no way to turn this annoying "feature" off.

    Could anyone tell me what is happening?

    Thanks!

  15. Tim McCormack says:

    Rol Murrow @#40798: Check the 2 comments right above yours. It's the same problem.

  16. Rol Murrow says:

    Hi Tim,

    Yes, I agree it might be the same problem but no one seems to be providing a solution in a reply.

    However I note that my problem began soon after I loaded a YouTube downloader toolbar from BienneSoft. I can't tell if that precipitated the problem.

    Cheers,

    Rol

  17. Tim McCormack says:

    Ah, you've tried changing your DNS settings? If the toolbar is indeed the problem (and it could be, given that this would make them money) then you might try another browser, another user account, or even better another computer on the same network.

  18. user says:

    Thank you.Simple and informative!
    Great work!

  19. Rol Murrow says:

    Tim,

    I set the values in FireFox as suggested. I am also using Google DNS 4.2.2.2 and 8.8.8.8. The problem I described above is still there.

    I am assuming a toolbar or something else I installed is causing the redirection for nonexistent domain names to http://www.web-help-service.com, which then immediately redirects me to http://searchassist.teoma.com/landing.jsf ... etc.

    Any further suggestions? thanks!

  20. Tim McCormack says:

    Rol Murrow: It's not standard Firefox keyword search. If it's a crapware toolbar, you've got other problems to deal with.

  21. Firefox – How to turn off domain guessing and keyword search. « Pragmatic Jeff says:

    [...] wasn’t an ISP feature, it’s a Firefox feature. Here’s an easy to follow recipe to Turn off domain guessing and keyword search in Firefox. Categories: Miscellaneous Comments (0) Trackbacks (0) Leave a comment [...]

  22. Chrystin says:

    Awesome information. I was looking for this because with my new computer and Windows 7 any mistyped addresses go to Bing, and I hated that. They announced Bing is now the 2nd most used search engine and I have no doubt it's because of this single feature. I didn't notice this issue prior to Windows 7, so may have turned it off many moons ago and forgot about it. MS deciding things for me on my own computer is one of those life aggravations that I am determined to foil when I can!