How To: Disable redirect to search engines in the Firefox URL bar

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
BG405
Level 9
Level 9
Posts: 2507
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

How To: Disable redirect to search engines in the Firefox URL bar

Post by BG405 »

How to disable the annoying redirects to search engines from the address bar in Firefox, works for FF47:
  • Open about:config
    Type keyword in the filter box
    Change the "keyword.URL" string to http://127.0.0.1
    Leave "keyword.enabled" as TRUE.
Job done. :mrgreen:

Now if you make a typo, as long as there isn't an identical URL out there, you will be presented with the "Server not found" message, showing you the URL you typed, instead of being redirected to your default search engine. This is exactly how the address bar should behave in my opinion, as searching is what the search bar is for!

The search bar still works as it should. Changing default search provider works fine but leaves this setting alone.

This should also prevent the occasional search-engine redirects when you've actually typed the correct address, as happened to me (again) earlier, probably caused by a temporary connection issue with the site in question.

NOTE: You might want to copy the original URL in case you wish to restore it later, in my case https://duckduckgo.com/?t=lm&q=
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
User avatar
linuxviolin
Level 8
Level 8
Posts: 2081
Joined: Tue Feb 27, 2007 6:55 pm
Location: France

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by linuxviolin »

BG405 wrote:How to disable the annoying redirects to search engines from the address bar in Firefox

(...)

This is exactly how the address bar should behave in my opinion, as searching is what the search bar is for!
Well, for me this possibility of the address bar is not bad, even quite practical.
K.I.S.S. ===> "Keep It Simple, Stupid"
"Simplicity is the ultimate sophistication." (Leonardo da Vinci)
"Everything should be made as simple as possible, but no simpler." (Albert Einstein)
afifaadam

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by afifaadam »

1. start Mozilla Firefox and write “about.config” in the url bar.
find out advanced options for Firefox browser.

2. click 2 times on “browser.search.defaultenginename”
find out the search engine dialog on Firefox

3. change “unwanted web address” in the option box with a preferred one
change search engine for Firefox browser

4. Click “OK” button and restart Firefox
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by xenopeek »

This seems unnecessary, at least testing on Firefox 48. For example if I type "foobar123.com" I'm told server not found.

Possibly you upgraded from an earlier Firefox version where you/they had enabled such a redirect?
Image
User avatar
BG405
Level 9
Level 9
Posts: 2507
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by BG405 »

xenopeek wrote:Possibly you upgraded from an earlier Firefox version where you/they had enabled such a redirect?
The Firefox installations were indeed upgraded from the initial v43 which comes with Mint 17.3. I'm not aware of having enabled it myself.

What I found was that a typo and, sometimes, a correct URL entered in the URL bar would result in my default search engine coming up instead of either a "server not found" message or the intended address. In fact when I did this it was the first time in years I'd seen such a message in Firefox.

This is simply a way to prevent searching (at all) from the URL bar for those like myself who wish to keep the search function separate :) it also helps to reduce the possibility of clicking on a spoof site, especially important with online banking etc..

ETA: I did disable the "search suggestions" dropdown and "autocomplete". Not sure if this has any effect on the above though.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
User avatar
xenopeek
Level 25
Level 25
Posts: 29597
Joined: Wed Jul 06, 2011 3:58 am

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by xenopeek »

Okay, my mistake. When you type a valid (syntactically correct) domain name in the location bar, like "foobar123.com", it will respond "server not found". If you type something else, like "foobar123", it will do a search instead.

On https://support.mozilla.org/en-US/kb/ho ... ddress-bar it's documented how to disable the search engine in the location bar and how to disable domain guessing in the location bar. Basically set the following all to false:
  • keyword.enabled
  • browser.fixup.alternate.enabled
From Preferences > Privacy > Location Bar you can toggle whether your history, bookmarks, and/or open tabs are used for giving search suggestions in the location bar. From Preferences > Search you can toggle whether results from the default search engine are used for giving search suggestions in the location bar.
Image
User avatar
BG405
Level 9
Level 9
Posts: 2507
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

Re: How To: Disable redirect to search engines in the Firefox URL bar

Post by BG405 »

Thanks for that xenopeek I had been searching for ages looking for a solution to this "feature" of Firefox to no avail, just years-out-of-date stuff which didn't do exactly what I wanted, hence my wish to post an up-to-date solution. I'll try your suggestion later & see what happens :D - I'm always willing to experiment. I'm happy with the result of my OP though :wink:
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
Post Reply

Return to “Tutorials”