What the message looks like
This site can’t be reached
cloud.beispiel.de refused to connect.
ERR_CONNECTION_REFUSEDCommon causes
- The web server (nginx, Apache) or the application is stopped or has crashed.
- The service listens only on
127.0.0.1instead of the public address, or on a different port than expected. - A firewall rejects the port with REJECT (with DROP you would get a timeout instead).
- Wrong port in the URL, a missing port forward on the router, or the wrong target IP in DNS.
- Local development:
localhostresolves to::1(IPv6) but the server listens on IPv4 only.
Check
- Test the connection and see the exact error
curl -v https://cloud.beispiel.de/ - Is anything listening on port 80/443 on the server?
ss -ltnp | grep -E ':(80|443) ' - Check the port from outside
nc -zv cloud.beispiel.de 443 - Review firewall rules
sudo ufw status verbose; sudo iptables -L -n | head -n 40
Fix
- Start the service and find the cause in the journal:
systemctl restart nginx, thenjournalctl -u nginx -n 50 --no-pager. - Fix the bind address:
listen 80;orlisten 443 ssl;in nginx; for applications use0.0.0.0instead of127.0.0.1if it must be reachable from outside. - Open the port in the firewall, for example
ufw allow 443/tcp, and with cloud providers check the security group as well. - Check the router port forward and the A/AAAA records in DNS: do they point to the right IP?
- When testing local servers, use
127.0.0.1instead oflocalhost, or bind the service to IPv6 too. - As a visitor: try another network or mobile data, and turn off VPN and proxy.
Typical scenario
After a server reboot a user opens https://cloud.beispiel.de and gets ERR_CONNECTION_REFUSED. ss -ltnp shows that nginx never started because of a configuration error; nginx -t names the faulty line. After fixing it and running systemctl start nginx the page loads again.
FAQ
How is it different from ERR_CONNECTION_TIMED_OUT?
With “refused” the target answers immediately and says no. With “timed out” nothing answers at all, usually because a filter silently drops packets or the host is unreachable.
Is the problem on my side or on the server?
If the site works from another network or device, the cause is your device or network (proxy, VPN, hosts file). If it fails everywhere, it is the server or its firewall.
Why does ping work but the browser still says “refused”?
Ping uses ICMP and only shows that the host answers. The error concerns a specific TCP port, and nobody may be listening there. Test the port with nc -zv host 443.
Can a browser proxy cause this error?
Yes. If a proxy is configured that is not running, it refuses the connection. Check the proxy settings of the system and of browser extensions.