Secure connection and certificate errors

Firefox: Secure Connection Failed

Firefox could not set up a secure connection to the website.

Quick answer

Firefox tried to create an encrypted connection and it failed. Unlike a certificate warning, there is no option to continue. A VPN, security software, a proxy or a server misconfiguration is usually responsible.

When to wait: Waiting rarely helps.

If you are visiting the website

  1. Reload once and try another browser Press reload once. If it still fails, open the same address in another browser. If it works there, the cause is likely in Firefox or something connected to it.
  2. Check your device's date and time A wrong clock can make secure setup fail. Turn on automatic time and reload.
    Windows
    Start > Settings > Time & language > Date & time. Turn on "Set time automatically".
    macOS
    Apple menu > System Settings > General > Date & Time. Turn on "Set time and date automatically".
    Linux
    Run timedatectl status and check "System clock synchronized". On systemd-based systems, sudo timedatectl set-ntp true turns on network time.
    Android
    Settings > System > Date & time. Turn on "Set time automatically".
  3. Restart Firefox in Troubleshoot Mode Open the Firefox menu > Help > Troubleshoot Mode… > Restart. This turns extensions off for that session only. If the site works, turn your extensions back on one by one to find the culprit.
  4. Check Firefox proxy settings Open Firefox Settings, search for "proxy" and open Network Settings. If you do not need a proxy, choose "No proxy" and test again.
  5. Test security software and VPN Antivirus HTTPS scanning, a VPN or a filter can cut the secure connection short. Pause one at a time for a single test, then turn it back on.
  6. Try another network Switch between Wi-Fi and mobile data or a hotspot. If the site loads there, a firewall or proxy on the first network is involved.

If you run the website

  1. Test the handshake yourself Run openssl s_client -connect example.com:443 -servername example.com. A connection that closes without a certificate points to a broken TLS setup on the server, load balancer or CDN.
  2. Check protocols and certificate Enable TLS 1.2 and TLS 1.3 and serve a valid certificate with its full chain. In nginx, test with sudo nginx -t and reload with sudo nginx -s reload.
  3. Make sure port 443 serves HTTPS If port 443 answers with plain HTTP, Firefox may show SSL_ERROR_RX_RECORD_TOO_LONG. The nginx listen line needs ssl, such as listen 443 ssl;.
  4. Read the server log at the failure time Handshake errors usually leave a line in the web server or load balancer error log. Match the time a visitor reported.

How it differs from "Potential Security Risk Ahead"

"Potential Security Risk Ahead" means Firefox got a certificate but did not trust it. "Secure Connection Failed" means the secure connection never got that far.

That is why there is no button to continue. There is no secure channel to continue on.

Is it the website or me?

If another browser on another network loads the site fine, look at your setup first. Extensions, proxies, VPNs and antivirus HTTPS scanning are the usual causes.

If every browser fails on every network, the website's HTTPS setup is broken and only the owner can fix it.

What the small error code tells you

The page shows a code under the title. PR_END_OF_FILE_ERROR means the connection ended in the middle of the secure setup, often due to a proxy, VPN or security tool.

SSL_ERROR_RX_RECORD_TOO_LONG usually means the server answered without encryption on a secure port.

Common questions

Why does Chrome open the site but Firefox does not?

Firefox may have a different proxy, DNS over HTTPS or extension setup. Troubleshoot Mode and the proxy check above usually show which one.

Will refreshing Firefox delete my bookmarks?

This guide does not ask you to refresh or reset Firefox. Troubleshoot Mode only disables extensions for one session and changes nothing permanently.

Is it safe to keep using the site after it starts working?

Yes, if it loads normally with a padlock and no warning. The error only meant the secure setup failed at that moment.

Likely causes

  • Common Antivirus, a VPN or proxy intercepts the connection. (Your side)
  • Sometimes The server has a broken HTTPS setup. (Website side)

What to avoid

  • Do not turn off your antivirus permanently.

Is the website down? Check it now

One measurement point. Results explain what we saw, not a worldwide verdict.

Sources

Last reviewed: