Skip to main content

How to Troubleshoot Cloudflare Error 523: Origin Is Unreachable

Cloudflare Error 523 occurs when Cloudflare is unable to establish a connection with your origin server. This error indicates that while Cloudflare is functioning correctly, the request cannot reach your website's hosting server.

Cloudflare Error 523 occurs when Cloudflare is unable to establish a connection with your origin server. This error indicates that while Cloudflare is functioning correctly, the request cannot reach your website's hosting server.

Before you begin

You will need:

  • Access to your Cloudflare account

  • Access to your origin server or hosting control panel

  • The IP address of your origin server

Check the origin server's connectivity

The most common cause of a 523 error is that the origin server is not reachable via the IP address provided in your Cloudflare DNS settings.

  1. Identify the IP address of your origin server.

  2. Use a command-line tool like ping or traceroute to check if the server responds to requests.

  3. If the server does not respond, contact your hosting provider to ensure the server is online and the IP address is correct.

Verify DNS records in Cloudflare

If your origin server is online but you still see a 523 error, the issue may lie in the DNS configuration within Cloudflare.

  1. Log in to your Cloudflare account.

  2. Select the domain experiencing the issue.

  3. Navigate to the DNS section.

  4. Locate the record (typically an A or CNAME record) pointing to your origin server.

  5. Verify that the IP address or destination listed matches your current origin server IP.

  6. If you recently changed your hosting provider or server IP, update the record and click Save.

Check firewall and security settings

A 523 error can occur if your origin server's firewall is blocking Cloudflare's IP addresses.

  1. Identify the IP ranges used by Cloudflare.

  2. Access your server's firewall (e.g., iptables, firewalld, or a hardware firewall).

  3. Create a rule to allow incoming traffic from all Cloudflare IP ranges.

  4. If you use a security plugin or a Web Application Firewall (WAF) on your origin server, ensure it is not blocking Cloudflare's requests.

Verify the web server service

Ensure that the web server software (such as Apache or Nginx) is actively running and listening on the correct port.

  1. Log in to your server via SSH or your hosting control panel.

  2. Check the status of your web server service.

  3. If the service is stopped, restart it.

  4. Verify that the web server is listening on the port specified in your Cloudflare DNS settings (typically port 80 or 443).

Confirm the origin's capacity

In some cases, a 523 error occurs because the origin server is overwhelmed and cannot accept new connections.

  1. Check the server's resource usage (CPU, RAM, and Bandwidth).

  2. If the server is at maximum capacity, it may drop connections from Cloudflare.

  3. If resources are exhausted, you may need to upgrade your hosting plan or optimize your website's performance.

Confirm the result

  • The website loads successfully without the Cloudflare 523 error page.

  • The browser displays your website content instead of a Cloudflare error message.

Limitations

A 523 error is specific to the connection between Cloudflare and your origin server. This procedure does not resolve issues related to your local internet connection or browser cache. If the issue persists after verifying the steps above, contact your hosting provider to confirm that your server is accepting traffic from Cloudflare's IP ranges.

Did this answer your question?