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 (such as cPanel, Plesk, or a custom dashboard).
- Locate the Server, Services, or Restart section.
- Select the option to restart the web server (Apache, Nginx, or IIS).
- Wait two to five minutes, then reload your website.
4. Review Server Resource Usage
- Open your hosting control panel and navigate to Resource Usage, CPU and Concurrent Connection Usage, or Metrics.
- 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. Analyse Website Logs
- In your hosting control panel, open Raw Access Logs, Error Logs, or Logs.
- 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. Optimise 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.
- Optimise 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.
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.
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