# Cloudflare 520 to 526 errors

> Errors 520 to 526 mean Cloudflare reached your domain but got no usable answer from the origin, and this article maps each code to its check.

Source: https://docs.wpwaterfall.com/troubleshooting-cloudflare-52x

Errors 520 to 526 come from Cloudflare, not WordPress. They mean Cloudflare could not get a usable answer from the origin, which is your WP Waterfall environment. The code says what went wrong. Most clear after you check the domain's DNS, its certificate, and the site's temporary address.

## What does each code mean?

| Code | Meaning | Usual cause |
|---|---|---|
| 520 | Unknown error | The origin sent a reply Cloudflare could not read, often from a PHP fatal error. |
| 521 | Origin is down | The origin refused the connection, for example while the environment restarts. |
| 522 | Connection timed out | The origin did not answer the connection in time. |
| 523 | Origin is unreachable | The domain points at an address that is not your site. |
| 524 | A timeout occurred | The origin connected but answered too slowly, usually a slow page or a stuck PHP worker. |
| 525 | SSL handshake failed | The certificate does not match the domain, or is not ready yet. |
| 526 | Invalid SSL certificate | Your own Cloudflare account uses Full (strict) and the origin certificate is not valid for the domain. |

## How do I find the cause?

1. **Open the temporary address.** Copy the temporary hostname from **Info**. If the site loads there, the problem sits between Cloudflare and your domain. If it does not, start with [Site is slow](https://docs.wpwaterfall.com/troubleshooting-site-slow) or [502 after a deploy](https://docs.wpwaterfall.com/troubleshooting-502-after-deploy).
2. **Check the DNS records.** Open **Domains**, open the domain's menu, and choose **Verify**. A record that points elsewhere causes 523. A proxied record in a Cloudflare account you own can cause 521 and 522. Set the CNAME to DNS only, as [Domains](https://docs.wpwaterfall.com/domains) describes.
3. **Check the certificate.** A certificate that is still issuing, or failed to renew, causes 525 and 526. The domain's status text names the record to fix. See [SSL certificates](https://docs.wpwaterfall.com/ssl-certificates).
4. **Check your Cloudflare SSL mode.** This applies only when you proxy the domain in your own Cloudflare account. Full (strict) needs a valid origin certificate. Full accepts any.
5. **Read the logs.** Open **Logs** and look at the time of the error. A fatal error in `php-error.log` explains a 520. A slow request in `access.log` or `slow.log` explains a 524.

## How do I fix it?

- **Wrong DNS.** Correct the record at your DNS host, wait for it to spread, then verify the domain again.
- **Failed certificate.** Fix the record or the Cloudflare redirect on `/.well-known/acme-challenge/` first. The certificate then issues on its own.
- **Slow or stuck PHP.** Restart PHP from **Tools**, then find the slow page in the logs.
- **A deploy caused a 520.** Roll back in **Deploys** on live's **Info** page.

WP Waterfall does not change Cloudflare settings in your own account.

## Related

- [Domains](https://docs.wpwaterfall.com/domains)
- [SSL certificates](https://docs.wpwaterfall.com/ssl-certificates)
- [Edge cache and CDN](https://docs.wpwaterfall.com/edge-cache)
- [View logs](https://docs.wpwaterfall.com/logs-viewer)
- [Domain not resolving](https://docs.wpwaterfall.com/troubleshooting-domain-not-resolving)
