How can I disable searching and domain guessing from the Firefox Address Bar, while keeping other features?
Go to about:config and set the following preferences to false:
browser.fixup.alternate.enabled
True (default): Try to fix up
http://foo
tohttp://(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=
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.
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.
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.