'Firefox redirects to https

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?



Solution 1:[1]

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)

Solution 2:[2]

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 !

Solution 3:[3]

Check your extensions!

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

Solution 4:[4]

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

Solution 5:[5]

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://

Solution 6:[6]

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 over HTTPS. More on it here and here.

Solution 7:[7]

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.

Solution 8:[8]

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.

Solution 9:[9]

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

Solution 10:[10]

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

Solution 11:[11]

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.

Solution 12:[12]

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.

Solution 13:[13]

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