ERR_CONNECTION_REFUSED Checklist for VPS Websites
ERR_CONNECTION_REFUSED means the browser tried to connect to your server, but the connection was refused. This can happen when Nginx is not running, the firewall blocks the port, DNS points to the wrong IP, the VPS service is down or no application is listening on port 80 or 443.
Common causes
- Nginx is stopped.
- Firewall blocks HTTP or HTTPS.
- DNS points to the wrong server.
- The VPS is offline.
- The application is not listening on the expected port.
- Cloudflare proxy is pointing to a broken origin.
Checklist
- Check if the VPS is online from the provider dashboard.
- Confirm the domain points to the correct VPS IP.
- Try opening the VPS IP directly in the browser.
- Check Nginx status.
- Check whether ports 80 and 443 are open.
- Check UFW firewall rules.
- Check Nginx config syntax.
- Review recent firewall or Nginx changes.
- Temporarily pause Cloudflare proxy if needed for testing.
- Reload or restart the correct service after fixing the cause.
Final check
Connection refused is a network or service availability issue. Start with VPS status, DNS, firewall and web server status before changing WordPress or application settings.
When to Use This Checklist
Use this checklist when a website on a VPS shows ERR_CONNECTION_REFUSED in the browser.
Required Tools
Domain access, VPS provider console, SSH access, Nginx, UFW firewall, DNS access, Cloudflare access if used
Before You Start
Confirm you have VPS console access before changing firewall rules, because a wrong firewall rule can lock you out of SSH.
Structured Checklist Steps
- Check VPS power status.
- Confirm domain DNS points to the VPS IP.
- Test direct IP access.
- Check Nginx status.
- Check UFW status.
- Allow ports 80 and 443 if needed.
- Run nginx -t.
- Check if Cloudflare proxy is hiding the origin issue.
- Reload Nginx.
- Test again in browser.
Verification Steps
- Open the domain over HTTP and HTTPS.
- Confirm Nginx is active.
- Confirm firewall allows 80 and 443.
- Confirm DNS resolves to the correct IP.
Rollback Plan
If firewall changes block access, log in using the VPS provider console and disable or correct the firewall rules.
Common Mistakes
- Changing WordPress settings before checking Nginx.
- Forgetting to open port 443.
- Testing through Cloudflare without checking origin.
- Pointing DNS to an old VPS IP.
- Restarting random services without checking status.
Related Commands
sudo systemctl status nginx
sudo ufw status
sudo ufw allow 80
sudo ufw allow 443
sudo nginx -t
sudo systemctl reload nginx
dig example.com