An "SSL connection refused" error means your browser or application tried to open a secure connection to the server, but the server rejected or did not respond to that request. The problem is not with the SSL certificate itself — it is with the availability of the service on port 443.
This article walks you through the most common causes and concrete steps to diagnose and fix the error, whether you are on shared hosting, a VPS, or a dedicated server.
What Does "SSL Connection Refused" Actually Mean?
When a browser loads an https:// URL, it first opens a TCP connection to port 443 on the server. If the server actively rejects that connection (sends a RST packet) or nothing is listening on that port, the client's operating system returns a "connection refused" error.
It is worth distinguishing this from other SSL errors:
- Connection refused → the port is not open or the service is not running.
- SSL handshake failed → the port is open, but the TLS negotiation fails.
- Certificate expired → the certificate exists but is past its expiry date.
Most Common Causes
1. The Web Server Is Not Running
Apache, Nginx, or another web server may have stopped due to a reboot, a failed update, or a configuration error. If the process is not active, nothing is listening on port 443.
2. Port 443 Is Blocked
A firewall (iptables, firewalld, UFW, or your hosting control panel) may be blocking inbound traffic on port 443. Cloud providers can also block it at the security-group level if the rule was not set up.
3. SSL/TLS Is Not Enabled in the Web Server Config
On some servers, Apache's mod_ssl module or Nginx's SSL server block may exist in the configuration but not be activated, or a syntax error may be preventing the daemon from starting the HTTPS virtual host.
4. The SSL Certificate Is Not Installed
If the certificate is pending installation or a silent AutoSSL failure occurred (common in cPanel environments), the HTTPS virtual host may simply not exist.
5. IP Binding Mismatch
On multi-IP servers, the SSL virtual host may be bound to a different IP address than the one the domain's DNS points to. Port 443 responds on the correct IP, but not for that specific domain.
How to Diagnose the Error Step by Step
Step 1: Check Whether Port 443 Is Open
From any external machine, run:
curl -v https://yourdomain.com
# or
openssl s_client -connect yourdomain.com:443
If you see "Connection refused", the problem lies in the network or the server process. If you see an incomplete handshake, the process is running but there is a certificate or configuration issue.
Step 2: Check Web Server Status
On a VPS with SSH access:
# For Apache
systemctl status httpd
# For Nginx
systemctl status nginx
If the service is inactive or dead, restart it and check the error logs for the root cause.
Step 3: Review Firewall Rules
Confirm port 443 is allowed:
# With firewalld
firewall-cmd --list-all
# With iptables
iptables -L INPUT -n | grep 443
If no permitting rule appears, add one using your firewall management tool.
Step 4: Validate the SSL Virtual Host Configuration
For Apache, check for syntax errors before reloading:
apachectl configtest
For Nginx:
nginx -t
Any error here prevents the server from starting the HTTPS virtual host.
Solutions by Environment
| Environment | Most Likely Cause | Recommended Fix |
|---|---|---|
| Shared hosting (cPanel) | Pending or failed AutoSSL | Reinstall SSL from cPanel > SSL/TLS > Manage Sites |
| VPS / dedicated server | Stopped service or firewall | Restart Apache/Nginx; open port 443 in the firewall |
| Cloud (AWS, GCP, Azure) | Missing inbound rule for 443 | Add TCP 443 inbound rule in the security group |
| CDN / proxy (Cloudflare) | SSL mode set to "Off" | Switch SSL mode to "Full" or "Full (strict)" |
Special Case: Cloudflare with SSL Mode "Off"
If you use Cloudflare and the SSL mode is set to "Off", Cloudflare will try to reach your origin over HTTP. If your server redirects all HTTP traffic to HTTPS, you get a redirect loop. If Cloudflare expects HTTPS but port 443 is closed, you get a connection refused error. Set the mode to Full (strict) and make sure a valid certificate is installed at the origin.
Long-Term Prevention
- Set up port-443 monitoring alerts (tools like UptimeRobot or Hetrix Tools notify you within minutes if the port goes down).
- Enable automatic Let's Encrypt renewal via a cron job or cPanel's ACME client to avoid certificate-related interruptions.
- Keep a documented firewall rule: every time you update the server or migrate to a new provider, verify port 443 is still open.
- Review web server error logs regularly; they often warn about SSL issues before they cause an outage.
If you manage multiple sites and want a hosting provider with SSL management included, outsourcing the technical upkeep can save you significant time and stress.
For more guides on certificates and web security, visit our SSL security section.
Key Takeaways
- The "SSL connection refused" error points to a closed port 443 or a stopped web service — not a problem with the certificate itself.
- The most frequent causes are: web server down, firewall blocking port 443, and misconfigured SSL module.
- Start diagnosis with
curl -voropenssl s_clientfrom an external machine. - On shared hosting, reinstalling the certificate from the control panel usually resolves the issue in minutes.
- Continuous port-443 monitoring lets you catch the failure before a visitor does.
Need help configuring and maintaining SSL on your site? Reach out to elenlace.com and our technical team will take care of it for you.
FAQ
Why does "SSL connection refused" appear only in some browsers?
It can be caused by DNS resolution differences — a local cache pointing to an old IP — or by browsers attempting port 443 before others. Flush your local DNS cache and test again from a different network.
Does a connection refused error hurt my site's SEO?
Yes. If search engine crawlers cannot reach your site over HTTPS, you lose rankings. Google may also show security warnings that drive visitors away. Fix the issue as soon as possible.
Can SSL run on port 80?
No. SSL/TLS uses port 443 by convention. Port 80 is used for unencrypted HTTP and for 301 redirects to HTTPS. Some internal proxies or load balancers may use custom ports, but the public-facing standard is always 443.
How long does it take for the error to clear after restarting the web server?
The service is typically available in under 60 seconds after a successful restart. If the error persists, check the server logs to find out why the process did not start cleanly.
Useful resources
Other providers and guides worth comparing: