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.
Estimated Time
Use Case
Use this checklist when a website on a VPS shows ERR_CONNECTION_REFUSED in the browser.
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