Firefox redirects http://localhost to https://localhost

For a long time I have been using a standard apache2 localhost server in my laptop. About one week ago Firefox began to redirect the http://localhost to https://localhost making impossible to access to the web server. Does anybody know how to solve this problem?

Try to check if HTTPS-Only Mode is enabled in Firefox’ Settings > Privacy & Security ?

That’s the recommended behaviour since years. If you haven’t installed an add-on which always redirects all websites or enabled HTTPS-Only Mode, then try to access the web server in a different, clean browser and check if it works there.

1 Like

HTTPS-Only Mode is not enabled

It happens also with chromiun, opera and an old version of Firefox ESR. I change also the searhing engine to “bing” without results

If it happens everywhere, then it’s either a global setting in your OS (I don’t know any such setting) or the web server has been changed. Are you just a user of that server or do you also change it?

If you change the web server, then it’s likely something changed without you noticing and it’s automatically redirecting, now. That’s usually the cause for such unexpected behaviour, if it works in none of the browsers you tried.

I’m the owner of the web server (it is in my laptop) and I didn’t make any change on it before the problem appeared. Normally I used this web server dayly. I don’t believe that some change in the OS (Ubuntu 20.04) have been done also, although I use an automatic update of the system.

Apparently I can avoid this problem if instead of localhost I use The web server appears and I tested some applications with success. Let’s see if the problem do not extend to the address in the future. Thank you very much for your help