Why Your Website Is Returning 520 Unknown Connection Errors and How to Fix It
Summary
This guide helps you troubleshoot and resolve: Why Your Website Is Returning 520 Unknown Connection Errors and How to Fix It. Follow the steps below to fix the issue.
Common Causes
A 520 Unknown Connection error means your web server is reachable, but it returned an empty or unexpected response to the visitor's browser. For Australian small businesses, this is often caused by server resource bottlenecks such as memory limits, CPU throttling, or slow response times on shared hosting plans. This guide explains how to diagnose and resolve these issues so your website stays online and responsive.
Quick Fix Steps
- Refresh the page to see if the error clears.
- Check your hosting provider's status page for reported outages.
- Clear your browser cache or test the site in an incognito window.
- Restart your web server if you have access to your hosting control panel.
- Contact your hosting provider if the error persists.
Detailed Instructions
1. Verify the Error Is Not Local
- Open your website in an incognito or private browsing window.
- Press
Ctrl+Shift+Nin Google Chrome or Microsoft Edge, orCommand+Shift+Non macOS. - If the site loads correctly, clear your browser cache and cookies, then reload the page.
- Try accessing the site from a different network, such as your mobile phone on 4G or 5G, to rule out local ISP routing issues.
2. Check Your Hosting Provider's Status
- Visit your hosting provider's status page or system health dashboard.
- Look for any reported incidents affecting web servers, database servers, or network connectivity.
- If there is an active outage, wait for your provider to resolve it before proceeding.
3. Restart Your Web Server
- Log in to your hosting control panel.
- For cPanel: scroll to the Software section and click MultiPHP Manager, or use Terminal and run
sudo systemctl restart apache2orsudo systemctl restart nginx. - For Plesk: go to Websites & Domains > Apache & nginx Settings and click Restart Apache or Restart nginx.
- For custom dashboards: look for a Server, Services, or Restart section and select the option to restart the web server (Apache, Nginx, or IIS).
- Wait two to five minutes, then reload your website.
Restarting the server will briefly take your website offline. Avoid doing this during peak business hours unless the site is already returning errors.
4. Review Server Resource Usage
- Log in to your hosting control panel.
- For cPanel: click Metrics > Resource Usage or CPU and Concurrent Connection Usage.
- For Plesk: go to Websites & Domains > Web Statistics or open Resource Usage under the domain dashboard.
- Check whether CPU, memory, or entry processes are consistently hitting their limits.
- Look for spikes in resource usage that coincide with the 520 errors.
- If your account is on a shared hosting plan, high usage from other accounts on the same server can also cause timeouts.
5. Analyze Website Logs
- Log in to your hosting control panel.
- For cPanel: click Metrics > Raw Access Logs or Errors.
- For Plesk: go to Websites & Domains > Log Files and select error_log.
- Download the most recent error log for your domain.
- Search for entries around the time the 520 errors occurred.
- Look for messages about timeouts, script execution limits, database connection failures, or out-of-memory errors.
6. Optimize Your Website and Database
- Update your content management system (WordPress, Joomla, etc.), themes, and plugins to the latest versions.
- Deactivate any recently installed plugins or modules that may be causing heavy database queries.
- Optimize your database tables to remove overhead.
- Enable caching if your platform supports it, such as a caching plugin or server-side opcode caching.
- Compress images and minify CSS and JavaScript files to reduce page load times.
7. Check DNS and Proxy Configuration
- Log in to your domain registrar or DNS management console.
- Verify that your domain's A record points to the correct web server IP address.
- If you use a proxy service such as Cloudflare, confirm that your origin server is online and responding to requests.
- Temporarily bypass the proxy to determine whether the issue is at the edge or on your origin server.
8. Check Firewall Rules Blocking Origin Server IP
- If you use Cloudflare or a similar proxy service, log in to your Cloudflare dashboard.
- Go to Security > WAF or Firewall Rules and check for any rules blocking your origin server IP address.
- Review your origin server firewall (such as CSF, UFW, or Windows Firewall) to ensure it is not blocking requests from Cloudflare's IP ranges.
- In Cloudflare, go to Network > IP Access Rules and confirm your origin IP is not listed as blocked.
- Temporarily set Cloudflare to DNS Only mode (grey cloud) to bypass the proxy and test if the origin server responds directly.
- If the site works with the proxy bypassed, update your firewall rules to allow traffic from your proxy service's IP ranges.
Troubleshooting
Error Returns Immediately After Server Restart
This usually indicates an application-level problem rather than a temporary server glitch. Review your error logs for fatal PHP errors, database connection failures, or missing configuration files. If you recently updated your CMS or installed a new plugin, try reverting the change.
Site Works Intermittently
Intermittent 520 errors are commonly caused by resource throttling on shared hosting. Monitor your CPU and memory usage over 24 to 48 hours. If limits are being reached regularly, your site may have outgrown its current hosting plan.
Slow Load Times Before the Error Appears
Slow responses followed by a 520 error often point to database bottlenecks or inefficient scripts. Use your CMS performance tools or a website speed test to identify slow pages. Geographical latency can also affect Australian visitors if your server is located overseas; consider hosting closer to your customer base.
Before making changes to website files, databases, or server configurations, create a full backup of your website files and database. This ensures you can restore your site if a change causes unexpected issues.
If you host with us, you don't need to do this yourself — just Open a Ticket and our Brisbane team will get it sorted.
If none of these steps resolve the issue, your hosting plan may no longer provide enough resources for your website's traffic and functionality. Upgrading to a plan with higher CPU, memory, and process limits can eliminate recurring 520 errors and improve reliability for your visitors.
Still Having Issues?
💻 Open a Ticket