Home » SSL / HTTPS » HTTPS Not Working: Diagnose It by What You See

HTTPS Not Working: Diagnose It by What You See

Published 2026-10-03 | SSL / HTTPS

HTTPS Not Working: Diagnose It by What You See banner

"HTTPS not working" is one symptom with several different causes. The fastest way to find yours is to stop guessing and run one command that shows exactly where the connection breaks.

Run this first

From any computer with curl:

curl -vI https://example.com

Read the result against this table:

What you see What it means Go to
Connection refused The server is reachable, but nothing is listening on port 443 Cause A
Hangs, then Connection timed out Something is dropping traffic to 443 Cause B
SSL certificate problem: certificate has expired Certificate expired Expired certificate
SSL: no alternative certificate subject name matches Certificate is for a different hostname Cause C
Could not resolve host DNS problem, not HTTPS Domain not resolving
Works, but returns a different website Wrong server or default virtual host Cause D
HTTP/2 200 or HTTP/1.1 200 HTTPS works from here, so look at the visitor's side Cause E

On Windows PowerShell you can test the port itself:

Test-NetConnection example.com -Port 443

Cause A: nothing is listening on 443

The web server is running only on port 80, or is not running.

  • Check the server is up: sudo systemctl status nginx (or apache2).
  • Check what is listening: sudo ss -tlnp | grep ':443'. No output means nothing is on 443.
  • Your site config needs a listen 443 ssl; block (nginx) or a <VirtualHost *:443> with SSLEngine on (Apache), plus the certificate and key paths.
  • Validate the config before reloading: sudo nginx -t or sudo apachectl configtest.

Cause B: something blocks 443

If ss shows the server listening but outside connections time out, a firewall is in the way. Check each layer:

  1. The server firewall (sudo ufw status, or firewall-cmd --list-all).
  2. The cloud provider's security group or network rules.
  3. A hosting provider panel firewall.

TCP 443 must be allowed inbound. If you recently moved servers, an old IP in DNS can point at a machine that was never set up for HTTPS.

Cause C: the certificate does not cover this name

A certificate for example.com does not automatically cover www.example.com. Look at the names it contains:

echo | openssl s_client -connect example.com:443 -servername www.example.com 2>/dev/null | openssl x509 -noout -ext subjectAltName

Every hostname visitors use must appear there. Reissue the certificate to include the missing name, or use a wildcard certificate for subdomains.

Cause D: the wrong site answers

With several sites on one server, a request for a name that has no HTTPS configuration falls to the default server. Make sure the site has its own HTTPS server block with server_name set to the right names.

Cause E: it works for you but not for visitors

  • DNS may not have updated everywhere yet if you recently changed it.
  • The server may be sending an incomplete certificate chain. Desktop browsers sometimes repair this themselves while phones and API clients do not.
  • A CDN may be involved. Check its SSL mode: "Flexible" means the CDN talks plain HTTP to your origin, which causes loops if the origin forces HTTPS. See too many redirects.

After HTTPS works

Redirect plain HTTP to HTTPS so visitors never land on the insecure version, then consider HSTS.

Common mistakes

  • Installing the certificate in the hosting panel but forgetting to reload the server.
  • Testing in a browser that has cached an earlier failure.
  • Opening port 443 on the server firewall while the cloud security group still blocks it.

Frequently Asked Questions

HTTP works but HTTPS does not. What is the most likely cause?

Either no certificate is installed, or port 443 is not reachable. The curl output in this article tells you which one: a certificate error means the server answered, a refused or timed out connection means nothing is listening or something is blocking 443.

Do I need to open port 443 on the firewall?

Yes, both on the server's own firewall and on any cloud security group or network firewall in front of it. HTTPS uses TCP port 443.

Can a CDN cause HTTPS to fail?

Yes. If the CDN's SSL mode does not match what your origin server supports, visitors can see errors or redirect loops even though the origin looks fine.

Found a mistake or still stuck? Contact us. See how we write and check these guides in our editorial policy, or read about DocumentGuy.

More in SSL / HTTPS