205

I'm using Firefox, and while setting up a server, I have been fiddling around with redirects. Now, Firefox has cached a 301 redirect from http://example.com/ to https://example.com/ and from http://sub.example.com/ to https://sub.example.com/.

I've tried the following things:

  1. History -> Show all history -> Forget about this site.
  2. Checked that no bookmark with https://example.com/ is present.
  3. Changing browser.urlbar.autoFill to false in about:config.
  4. Changing browser.cache.check_doc_frequency from 3 to 1.
  5. Options -> Advanced -> Network -> Chached Web Content -> Clear now.

None of the above works, so I checked the redirect with wheregoes.com and it doesn't show any redirect from http to https. I've even changed the DNS to point to another IP served by a server, where I've never set up redirection - the redirection is still in effect.

I've also tried in Private Browsing in Firefox, and there is no redirect there. I've tried in Google Chrome, and there is also no redirect here.

I've also tried to make a redirect from https to http which worked in Google Chrome, and yielded a redirection error in Firefox.

My version of Firefox is 38.0.1, and I'm using Windows 8.1. I use the following addons: AddBlock, Avast! and LastPass. Avast! may not be the issue, as I've disabled it while testing.

What I can do about it?

5

18 Answers 18

274

"Sites preferences" are the culprit. Wasted 45min of my life finding how to fix it despite all the kb/support.mozilla tricks which does not solve your issue nor did mine. I don't know what triggers this issue, but several of my websites started to go pear-shaped in a few weeks only affecting me and only firefox.

That's the solution you are all looking for:

Firefox 119.0 and above (2023 : 8 years later, I faced the same problem again and realised it's due for an update :)

  1. Open Settings
  2. Search for clear history in your settings (top right corner)
  3. Click the Clear History button (nothing will be cleared yet, it's safe)
  4. Untick 'Everything'
  5. Tick Site settings
  6. Click Clear Now
  7. Try now

Firefox 119.0 clear history


Old firefox (2015 : when I originally answered)

  1. Go to Preferences
  2. Privacy
  3. Click 'Clear your history' (nothing will happen yet, click safely)
  4. Once the pop-up appears, click Details.
  5. Untick everything except 'Sites Preferences'
  6. Select 'Everything' in the select box at the top
  7. Click Ok
  8. Try now

Firefox capture

PS: What I did try that did not worked for me are:

  • urlbar.autofill false
  • Forget Website trick
  • Safe mode
  • We all know it is not an HSTS issue when a website you own and you accessed before never got https support but now FF wants you to use https... It is just a firefox bug IMO.
16
  • 1
    Thanks. Since I asked the question, I've found out it is definitely a consequence of STS. Your solution seems to work, so I will accept it as an answer. I'm sure, I tried your trick back nine months ago, where I faced the problem - so aybe it was a bug that they fixed.
    – talouv
    Dec 3, 2015 at 18:38
  • 13
    Now, in FF 49, It's the link clear your recent history, see screenshot found at Settings for privacy, browsing history and do-not-track | Firefox Help
    – Wolf
    Nov 17, 2016 at 12:20
  • 19
    Ticking Cache in Clear history details helped me.
    – cakan
    Feb 1, 2017 at 20:34
  • 1
    @Ralf : if it fails in Chrome and Edge then it is not a firefox problem, it's a server issue (or proxy or any active network device interfering with the HTTP protocol)
    – Thomas
    May 28, 2018 at 1:27
  • 4
    Clear all data in FF 60 doesn't helped me. And For sure it isn't a server issue (i checked it with wireshark and there is only connections on port 443 :()
    – Maypeur
    May 28, 2018 at 14:41
172

The solution that worked for me:

  1. Go to about:config
  2. Look for network.stricttransportsecurity.preloadlist and set it to false
  3. Enjoy

If the above STILL DOES NOT WORK, try setting browser.fixup.fallback-to-https to false from about:config

Using Firefox 100 or above you may also need:

  • dom.security.https_first to false
  • dom.security.https_first_pbm to false (this one is for anonymous windows)
8
  • 5
    This was the setting that I was looking for. Worked for me. I had urlbar.autofill set to false (did not work). I had accessibility.autoblockrefresh set to true (did not work). But this network.stricttransportsecurity.preloadlist worked for me. Firefox v 67.0.4 Jul 6, 2019 at 16:27
  • 6
    This does not work. Even when combined with the accepted answer -- that is, I did both, then closed and re-opened browser -- Firefox still redirects to https. Infuriating.
    – arnoldbird
    Apr 3, 2020 at 13:37
  • 18
    For me this didn't work so I set the browser.fixup.fallback-to-https to false
    – Muhammad
    Sep 9, 2020 at 13:05
  • This worked for me in Firefox 94. Dec 2, 2021 at 20:36
  • 1
    browser.fixup.fallback-to-https also work for me. Example: somedomain if this domain is not exists or unable to connect then it won't go to httpS://somedomain anymore.
    – vee
    Mar 27 at 7:43
41

I had the same problem but the answer was that I used a .dev extension to access my local websites !

I cleared all historic data in FF and nothing changed.

Searching for another solution, I found this page https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/

With .dev being an official gTLD, we're most likely better of changing our preferred local development suffix from .dev to something else. If you're looking for a quick "search and replace" alternative for existing setups, consider the .test gTLD, which is a reserved name by IETF for testing (or development) purposes.

I changed my local website extensions from .dev to .test and all work perfectly !

2
23

Alternative solution, easy.

Open Firefox and in the address bar type this URL

http://example.com/?fake_parameter_to_bypass_cache

This should force the browser to reload the web page from http://

3
  • 3
    LOL, it worked for me. I haven't cleared the cache yet. Now that I've realized this, next step is to clear browser cache.
    – yanntinoco
    May 20, 2020 at 20:21
  • i don't want to clear my caches/history, and both configs were already false, so I tried this one and it worked
    – caduceus
    Mar 2, 2022 at 12:43
  • Not worked for me firefox 88.0
    – MosQuan
    Jul 28, 2022 at 22:03
19

Check your extensions!

In my case, DuckDuckGo Privacy Essentials extension was causing this redirect. I disabled it, and the problem is solved.

2
  • 5
    That is super insensitive of Privacy Essentials. I type http, not https. I was suspecting HTTPS Everywhere I forgot about this. Thanks
    – Default
    Sep 8, 2020 at 4:19
  • An easy-ish way to try this is to open a private window. It disables all extensions. I assume it also does some other things that could also fix it, so probably not a perfect test.
    – Chris
    Dec 17, 2021 at 17:14
19

None of the answers worked for me, the only the one was the one in the comment of Muhammad so thanks in advance to him, I copy the answer here to make it easier:

  • Go to about:config
  • Look for browser.fixup.fallback-to-https and set it to false
4
  • 2
    This was the only thing that worked for me. I had no HSTS entries in my profile, and wasn't prepared to disable HSTS altogether. Turns out this was it for some reason - feels like a bug in FF though, as this setting is supposed to just try HTTPS after trying HTTP if you can't connect to a site. Oct 20, 2020 at 11:52
  • definitely a lot of wrong answers, but this one worked flawlessly. thank you
    – CasaCoding
    Oct 2, 2022 at 4:38
  • Didn't work for me (Firefox 109.0.1).
    – Esn024
    Feb 14 at 5:27
  • Didn't work for me (Firefox 120.0.0).
    – gdonald
    Nov 24 at 14:04
6

Now (Firefox 84) it is much simpler to clear the site's data. Just click the padlock icon on the left of the address bar. Then choose "Clear cookies and site data". I had the same situation as what OP did. It helped me to clear the HTTPS redirect.

1
  • Out of all the other solutions on this page, this is the ONLY one that worked for me. Thank you for saving what little is left of my hair from pulling it out over this one. /g Feb 22 at 17:07
4

In my case, I decided to use a *.dev domain for local development. But then I tried to open the site in Firefox, and after a while I realized it uses HTTPS, even when I start the url with "http://..." I tried to right-click on the link in the History, and choose Forget About This Site, or clear the cache. But it didn't help.

Later I found out that the dev domain is in HSTS preload list these days. Which means Firefox and Chrome (and probably others) don't let you access the subdomains w/o HTTPS. More on it here and here.

2
  • 1
    You mean "...don't let you access the subdomains without HTTPS"
    – volkerk
    Jul 22, 2022 at 15:58
  • Thanks a lot. Changing *.dev to *.local resolved my issue. Apr 3 at 8:02
3

Here's what worked for me on Firefox v98.0.2:

  1. Settings -> General
  2. Network Settings -> Settings
  3. Uncheck "Enable DNS over HTTPS

Enable http on firefox v98.0.2

2

I tried the 'correct' answer, plus the comment about including cache in the deletion, and I was still having issues with my problem site.

I opened the firefox profile directory and searched for the website name in all files.

I found it in 'logins-backup.json' and deleted that file to finally fix the problem.

2

Lets get back to the old firefox that was amazing, the 3.6. Nowadays is full of crap for us developers, and sysadmins. I have tons of sites in intranet that cannot have a valid ssl, this is a major deal. I cannot download "deb" files because its a threat, i cannot this and cannot that... why? I am a power user i know what to do whit, why should I (we) be treated like the rest of the users?

The cache, i cannot disable the cache to 100% why?

In a blip of a second i will be using links as my browser.

Firefox should have a expert mode, where none of this crap happens.

I am mad with firefox and chrome. That is why i still use firefox 3.6 in a lot of cases, to bypass stupid restrictions.

1

In newer versions of Firefox (tested 2023):

  1. Open the developer tools with F12 and select "network"
  2. Activate "disable cache"
  3. Set the http:// URL that you don't want redirected to https:// in the URL bar and press enter. It will load without redirection.
  4. Deactivate "disable cache" to leave it as it was before.
  5. Try reloading. It'll work correctly.

Click here on the "disable cache"

This allows you to treat the case a) specifically for one single URL and b) not leaving settings changed with respect before.

Just solves the problematic URL reverting it to the proper caching state.

5
  • I believe I followed these exact steps on Firefox 117.0 and the redirection still happens with the F12 network tab open and Disable Cache checked when I manually edit the URL to http.
    – jnm2
    Sep 7 at 13:23
  • Have you checked if the server is sending a 301 or 302? If the server sends that, then the redirection will happen for sure. This is to avoid cached redirection if the server redirected in the past and no longer redirects but the firefox still thought so. Disabling the cache forced the firefox to re-read the real-data coming from the server. Please do this and share the result: 1. disable cache, 2. clear the network history (trashcan icon), 3. load, 4. share with us if all the statuses are 200 or there is any 3xx. Sep 9 at 11:15
  • The server is not sending 301 or 302, and there is no https site. Other browsers like Edge are just fine with it and don't try to redirect. It's a site on local intranet with a xyz.mycompany.com domain. It also never redirected in the past.
    – jnm2
    Sep 10 at 17:12
  • Weird enough. I'm using non-https sites (plain http) in intranets too and Firefox is not trying to push me to https. Only this site? Or happens to all the non-https sites (other non-https domains or subdomains? Can you share a screenshot like mine where we can see the list of requests/responses and the statuses? Sep 15 at 16:44
  • Did not work for me (Firefox 120.0)
    – gdonald
    Nov 24 at 14:10
0

In my case, it was an addon that did it: disabling DuckDuckGo privacy essentials fixed it.

0
0

I had this issue when running Firefox with OWASP ZAP proxy. I didn't knew it was the proxy causing this. In hindsight it's easy to test this: run Firefox without OWASP ZAP proxy to see if it works. To get it working with OWASP ZAP, turn off Heads Up Display (HUD) or enable the HUD only for URL's that are in scope.

0

My problem was caused by the HTTPS by default extension. There is a bug that opens HTTP bookmarks with HTTPS. To work around, open "HTTPS by default" Preferences pane and enter domain name exclusion.

0

None of these suggestions worked for me in Firefox v101. What worked for me is changing the value of security.tls.version.min from 3 to 1 in about:config.

[NOTE: After I changed this setting, Firefox initially redirected from http to https. But this time Firefox allowed me to "accept the risk and continue," which wasn't possible when security.tls.version.min was set to 3. --end note]

See also: https://support.mozilla.org/en-US/questions/1116550

1
  • Did not work for me (Firefox 120)
    – gdonald
    Nov 24 at 14:12
-3

Now, I had this issue on my workstation's development site. I had an old site that I still wanted to reference, and I couldn't get http to work for anything. There was not https binding, either.

Finally, I realized I had a url-rewrite in my webconfig that redirected all http to https...

hahahaha

-4

Disabling https, is not an absolute in Firefox. Some sites will redirect and may not offer http.

However to choose one url over the other if it is an option you can disable autofil:

Address Bar Search In order to change your Firefox Configuration please do the following steps :

In the Location bar, type about:config and press Enter. The about:config "This might void your warranty!" warning page may appear. Click I'll be careful, I promise! to continue to the about:config page. In the filter box, type or paste autofill and pause while the list is filtered Double-click browser.urlbar.autoFill to toggle it from true to false.

3
  • 1
    Thanks for your reply. Unfortunately as I mentioned in the question, I've already tried what you describe. Besides, I own the server and the domain, so I know it serves http requests without redirect.
    – talouv
    Jun 7, 2015 at 7:48
  • Reference: support.mozilla.org/en-US/questions/1019210 complete with typo.
    – Manngo
    Dec 15, 2019 at 1:31
  • This answer is a duplicate of the following answer on Mozilla support forums: support.mozilla.org/en-US/questions/1019210#answer-627032 Feb 22, 2020 at 12:44

Not the answer you're looking for? Browse other questions tagged or ask your own question.