cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Firefox mistakenly performs search instead of opening web page after editing URL

szx
Making moves

Because the "http:" part is now hidden in the address bar when you edit URL, it creates a problem under some circumstances. For example:

1. Open a page like http://computername/subpath/

2. Edit the URL and delete the trailing slash (notice the "http://" part is not there)

3. Hit Enter

Expected result:

Firefox opens http://computername/subpath

Actual result:

Firefox submits computername/subpath to the search engine

This is probably not an issue for a regular user, but it's sort of annoying for web developers as they are the people who want control over the URL without the hiding of protocols. I think there should be an option to turn this off.

3 REPLIES 3

szx
Making moves

Found a config entry to turn this off:

browser.urlbar.trimURLs = false

Source: https://superuser.com/questions/341499/how-to-prevent-firefox-from-hiding-the-http-url-prefix

szx
Making moves

I still think that there is a bug that needs fixing. This is just a workaround.

jscher2000
Leader

Here's how it is designed to work when you enter hostname/path in the address bar:

If hostname is a dotted host name on an ICANN-registered domain, such as "example.com", or a recognized host like localhost, Firefox doesn't require either a protocol or a trailing slash. "Visit" will appear on the top line of the address bar autocomplete drop-down.

If hostname isn't recognized as a valid host name, then Firefox defaults to searching it instead of looking it up as a domain name. After the search results are displayed, Firefox does a domain lookup in the background and shows a bar above the results page asking if you meant to visit hostname -- selecting Yes adds a preference (visible/editable in about:config) to treat hostname as a valid host name in the future.

----

If you don't want to add a trailing slash and you don't see or don't want to use the post-search prompt to create the preference, you can manually create individual preferences by hand. Here's how:

(A) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button accepting the risk.

More info on about:config: Configuration Editor for Firefox. Please keep in mind that changes made through this back door aren't fully supported and aren't guaranteed to continue working in the future.

Scenario 1: hostname exception (manual version of the automated feature)

As an example, let's say your hostname is "accounting-west"

(B) In the search box in the page, type or paste browser.fixup.domainwhitelist.accounting-west

Firefox should display a bar with Boolean Number String and a plus button.

(C) Keep the selection on Boolean and click the plus button to create a new preference. If Firefox doesn't automatically set the new preference to true, double-click the preference to switch the value from false to true.

Test: enter accounting-west/quarterly into the address bar and Firefox should show "Visit" in the top line of the address bar autocomplete drop-down.

Scenario 2: top level domain exception

Some companies/developers use non-standard TLDs such as ".asdf" for internal servers. To cover all current/future .asdf addresses:

(D) In the search box in the page, type or paste browser.fixup.domainsuffixwhitelist.asdf

Firefox should display a bar with Boolean Number String and a plus button.

(E) Keep the selection on Boolean and click the plus button to create a new preference. If Firefox doesn't automatically set the new preference to true, double-click the preference to switch the value from false to true.

Test: enter example.asdf/about into the address bar and Firefox should show "Visit" in the top line of the address bar autocomplete drop-down.

----

You certainly could say this is not the privacy-maximizing behavior, since it arguably is less revealing to send your input to a DNS lookup than to your default search engine provider. However, this order of operations was adopted quite a long time ago to deliver faster results for searches. To reduce searches, you can toggle browser.fixup.dns_first_for_single_words to true in about:config. (This assumes your DNS server is honest and doesn't send a paid results page when a domain isn't found, like AT&T does.)