How can I disable searching and domain guessing from the Firefox Address Bar, while keeping other features?

I used to know how to configure this, but I can’t seem to find it again. Here are some special features I would like to keep in the Address Bar, and some I would like to disable:

  • To Keep:

    • Bookmark “keyword” functionality. (i.e.: “go searchterm” = http://www.google.com/search?&q=searchterm)
    • Bookmark and History searching. (i.e.: “SuperUser” will display suggestions for the SuperUser homepage from my bookmarks, and SuperUser threads from my history.)
  • To Disable:

    • URL Bar Web Searches. (i.e.: “SearchTerm” will take me to a Google page with results for SearchTerm.)
    • TLD Guessing. (i.e.: “superuser” will turn into “superuser.com”)

What defaults do I need to change so that the options I want kept remain available, while still turning off those I want disabled?

I’m currently running Firefox 10.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

Go to about:config and set the following preferences to false:

browser.fixup.alternate.enabled

True (default): Try to fix up http://foo to http://(prefix)foo(suffix)
False: Do not second-guess the user

keyword.enabled

Determines whether to use keywords
True (default): Send non-URLs entered in the Location Bar to the URL specified in keyword.URL
False: Disable keywords

Where the documentation for keyword.URL says this :

URL to use for keyword lookups. Default value in Firefox 2.0 is
http://www.google.com/search? ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=

Solution 2

Regarding search terms with dots – I did some searching and there’s currently no way to turn this off, as the browser would not know how to distinguish between a search term and an actual URL. However, if your search term includes other words separated by spaces, for example “browser.fixup.alternate.enabled ff”, then the search works. Likewise, you can use the keyword search (“g browser.fixup.alternate.enabled”) to get around this.

There was some discussion on Bugzilla of a feature to check DNS (treat it as a URL) first and then if that fails, to do a keyword search, but no one’s implemented that so far.

Solution 3

Hello from the future world of 2020!

Recent versions of Firefox seem to do the expected thing now when your search query maybe looks like "host.name.tld" but clearly isn’t a valid hostname. I didn’t dig into what changed exactly, but just FYI.

What follows is preserved for historical record only.


Hello from the future of 2019, where, as far as I can determine from the available about:config options mentioned above, it’s still not possible to completely disable this behavior when your search term contains a period.

How can I disable searching and domain guessing from the Firefox Address Bar, while keeping other features?

So it seems Firefox is forever going to assume that you really did mean to go to a web site called browser.fixup.alternate.enabled, or that an Awesome Bar search for vcruntime140.dll is a web site in some new ".dll" TLD (and help us all when that really does become an official TLD, because it’ll be ripe for malware distribution).

There is a simple but satisfying workaround, though, that I happened upon by blind luck today: prefix your search query with a ?, or press Ctrl+K, which both focuses the Awesome Bar and adds the "?" prefix for you.

The Ctrl+K shortcut is documented in the Firefox help, but it’s not really documented, because it doesn’t mention the "?" prefix. Does that mean it’s an undocumented behavior that could disappear at any time? Maybe. Enjoy it while it lasts.

The list of characters you can use to alter your search results is documented in the section called "Changing results on the fly" in this document, but it isn’t clear from that document that using a question mark is a possible solution to the OP’s problem. However, it is.

Pro tip: you can actually put the question mark anywhere in the query string, as long as it’s not quoted, so browser.fixup.alternate.enabled? will do what you expect, giving you results for that search term in your default search engine. Not sure if that’s a feature, or just a useful side-effect, since something with a "?" in it obviously isn’t a hostname.

Solution 4

Chrome tests whether the string has valid domain syntax and ends in a known tld before assuming it’s a URL. This gives far fewer annoying false positives than Firefox’s stupid “it’s got a dot” criterion.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply