De-crapping Firefox's automatic address mangling

Written by Tim Seifert on 25 March 2025, and last updated 9 May 2025.

Or… stopping Firefox automatically changing what you type into its address bar into something that you didn't want, killing Firefox's auto-fill, auto-complete, and auto-correct in the address bar.  You can still use them, they just don't interfere with normal operation, they become a do it when I choose to do it feature.  Instead of them automatically happening without your say-so, and putting up a fight when you try to remove them, they're now only in the drop-down list below the address bar, where you can choose them if you want to.

This is mostly notes for myself for when it comes to system updates and fixing up Firefox again, but it may help other people.  It applies to reconfiguring Firefox on a computer, I don't have info for taming it on tablets and phones.  That's something I would like to do, too.  It's hard enough typing something into a phone browser without having to fight against changes, especially when it doesn't want to let you edit something already in the address bar, making you type addresses completely from the beginning again.

Way back the in the past, when dinosaurs roamed the internet, browsers had less intrusive automation, or none at all.  You typed something in and it worked in the manner you expected, or it failed.  The browser didn't take over and presume you meant something else, and do that instead of what you wanted without even asking.

But now when I try to do something, it changes what I wanted into something I don't want.  Either immediately, or if the initial attempt didn't immediately succeed.  And as someone who does computing experiments and system repairs, it's quite common that I might need to repeatedly try an address that isn't working, until it does.  And it becomes a keyboard fight to actually do what I wanted (repeatedly removing its changes).  And, for what it's worth, Firefox subjected me to this malarkey whether I was using named or numerical IP addresses.

Below is a list of things I've discovered for taming the browser's address bar.  They're all settings changes, no add-ons or plug-ins are installed to the browser.  Some of them, by themselves, may solve a problem.  Or it may involve a variety of them.  I've done them all, as an absolute stop doing it approach.  This gives me an address bar that only does what I type into it, but doesn't stop it having a drop-down list of things that match my history or bookmarks, and some search icons down the bottom, to deliberately pick one of those things, if I want to.  It gets the automatics out of the way that continually stuff me up.

This should only affect what you type in the address bar, not what happens when following links in pages.  Any service that relies on the browser playing guessing games to fix-up broken links is destined for failure.

Mozilla keep re-arranging the deckchairs in Firefox, so these instructions may have an expiry date, though I do update my notes when I discover things have changed.  I started this page in March 2025.

Local Area Network (LAN) browsing

There are things on my LAN that have webservers, and I'd like to be able to load them in my browser directly by typing their hostname (or even domain name) into the address bar.  I do NOT want the browser doing an internet search for a “fileserver” or “laserprinter” because I typed that into the address bar.  And, I do not want it changing what I type as the address into something else, either.

Add the separate searchbar back to the browser

There used to be a separate searchbar to use for searching that avoided this issue.  Then they hid it, and even if you add it back the address bar still acts as a searchbar, as well, until you mess with settings hidden buried deep in about:config (details below).  But, first, right-click the toolbar, pick customise toolbar, drag the searchbar into where you want it in the toolbar.

Don't search from the address bar

After adding the separate searchbar back into the window you need to change a setting, as well, to change the address bar behaviour.  Change these keys to false:

keyword.enabled false
browser.urlbar.suggest.searches false

You can still search from the address bar, but sending what you typed out to Google (or other search engines) won't be the default behaviour.  You can type what you want, hold off from hitting enter, and in the drop-down list that appears below (before you press enter), you can click on something to turn it into a search, or access things it found in your bookmarks.  If you type something and hit enter, all it'll do is try to connect to what you've typed in.

Connect to hostnames instead of treating it as a search keyword

When entering a single word hostname (such as server, printer, or router), you want it to try to directly connect to something using that hostname as its address.  Of course the hostname will need to be entered into your local hosts file, or handled by your local DNS server.  Change this entry to true:

browser.fixup.dns_first_for_single_words true true

Connect to local domain names instead of treating it as a search keyword

LANs may use fully-qualified domain names that only exist in your LAN, and you expect the browser to connect to them instead of doing an internet search.  Of course the name will need to be entered into your local hosts file, or handled by your local DNS server.  If the FQDN's suffix (the TLD, or top level domain) is a normal one, like .com, the browser should handle querying this without you having to do anything.  But if it's something unusual like .lan, .home, or .gateway (e.g. server.lan, printer.home, or modem.gateway), you may need to add options to handle it in the manner you require.  It should just try a DNS query on any address you type, even ones like this, but it doesn't.  It tries to be helpful, instead, and fails to actually be helpful.  You can create your own boolean entries like this, to suit your needs:

browser.fixup.domainsuffixwhitelist.gateway true
browser.fixup.domainsuffixwhitelist.home true
browser.fixup.domainsuffixwhitelist.lan true

Standard advice is do not fake up domain names willy-nilly as addresses in your local network, such as the examples used above, but some devices are already hard-configured to use them and can't be be changed by you (such as some modem/routers).  Firefox already came preconfigured (in March 2025) to treat these suffixes differently than other domain name suffixes: .example, .internal, .invalid, .local, .localhost, & .test.  And you can add your own, as I've explained above.

Don't add things that I haven't typed

If I typed a one-word hostname that doesn't immediately work, Firefox will try adding https:// in front of it (perhaps www. as well), and adds .com after it.  If that's wrong for what I'm trying to do, it messes things up, and I have to undo what it's done for my next attempt.  It also means a longer wait before it gives up and fails.  Removing the automatic other things to try, lets it fail instantly.

The auto-fill-in can be disabled with:

browser.urlbar.autoFill false

You can modify it to always only fill-in http:// before an address by setting it here:

browser.fixup.alternate.protocol http

You can control what it may add as an alternative prefix here (deleting the default www. and leaving it blank):

browser.fixup.alternate.prefix   

You can control what it adds as an alternative suffix here (deleting the default .com and leaving it blank):

browser.fixup.alternate.suffix   

Ensuring I can find the local services on my LAN

I also ensure “DNS over HTTPS” (DoH, and what it callss “secure DNS”) is disabled, because I want my DNS server to be the thing that provides answers to all DNS queries (but with it allowed, it may try DoH first, which will fail, wastes time, and it exposes internal queries to the internet).

Only my DNS server can answer my LAN-related queries (the address of my printer, my router, etc).  Also, an external server is something that I cannot control to blackhole nuisances, and it might censor queries.  And my ISP's DNS server was always terrible (overloaded, slow, and often wrong—even with their own addresses).

DoH are settings available in the user-preferences/settings.  Alternatively, set this entry to 5:

network.trr.mode 5

Via experimentation with other settings (in March 2025), I discovered that mode number has these meanings:

Mode Mode name Brief description
0 default protection Firefox decides when to use DoH to protect your privacy
2 increased protection you control when to use DoH and choose your DoH provider
3 max protection Firefox will always use DoH, you’ll see a security risk warning before it uses your system DNS
5 off always use your default DNS resolver

HTTP by default, only do HTTPS on purpose

If I type an address into the address bar without typing any protocol prefix, such as example.com the browser will first try https://example.com instead of http://example.com.  And sometimes it will will change the protocol to https:// even if I have typed in http:// (this change is totally unacceptable to me, never change a complete address that I have typed).

These are new moves to try and be more secure across the internet.  But there are a lot of things that are not accessible via HTTPS, and this causes a connection failure, then a typing fight to get it to load the address that you wanted it to use.  Change these to false for the old behaviour:

dom.security.https_first false
dom.security.https_first_pbm false
dom.security.https_first_schemeless false
browser.fixup.fallback-to-https false
network.stricttransportsecurity.preloadlist false

The first three affect what the browser does if you didn't type a protocol before the address, the last three affects it changing what you typed.  With the last one dealing with a list of addresses coded into Firefox that it believes should be HTTPS.

If you always want HTTP by default, it may be worth searching the about:config options for https_first and setting them all to false.  There may be other options in there pertinent to you, or newer ones than this page mentions.

Of course you should use HTTPS for your banking, or spending money over the internet.  Most of those kinds of services will redirect you from their HTTP site to their HTTPS site, themselves.  And if you bookmark your bank's address, then your browser will normally find it for you when you start to type its address in the address.

The point of these modifications is to stop the browser changing what you're trying to do, not stop it doing something you want.

Don't hide the protocol

Let me see whether an address starts with the http:// or https:// protocol, all the time, just by looking at the address bar.  Don't hide it and make me click on something to check.  Set this option to false:

browser.urlbar.trimURLs false