Guides › Hosting, domain & email › Site down or error screens

Cloudflare Error 520 and 524: Unknown Error and Timeout

520 is an unexpected origin response; 524 is a timeout.

Reference guide. This guide is written from established practice and the official documentation of the tools involved. We have not yet tested every step on a live demo site. Back up your site before you change anything.
Site down or error page

Cloudflare error 520 means your origin server sent back something Cloudflare did not understand. Error 524 means the origin accepted the connection but took too long to answer. Both are problems at your server, not at Cloudflare.

1Check that the origin is up2Look at the origin's error log3Check headers and cookies4For 524, find the slow request5Move long tasks away6Allow Cloudflare through your firewall7Test againFixed? Test the site. If not, get help.
The steps in order. Work down the list and stop when the problem is solved.

Step 1: Check that the origin is up

Illustration for Step 1: Check that the origin is up

Open the site by its direct server address (or pause Cloudflare for a few minutes) to see whether the server responds.

Step 2: Look at the origin's error log

Illustration for Step 2: Look at the origin's error log

Open your host's error log for entries at the time of the error. A PHP crash or a limit reached is the usual cause of 520.

Step 3: Check headers and cookies

Illustration for Step 3: Check headers and cookies

Very large headers or invalid response headers cause 520. Look for plugins that set huge cookies.

Step 4: For 524, find the slow request

Illustration for Step 4: For 524, find the slow request

A request that runs longer than about 100 seconds will time out on Cloudflare's standard plans. Look for heavy admin tasks, imports and slow plugins.

Step 5: Move long tasks away

Illustration for Step 5: Move long tasks away

Run big imports and backups from the server, or by a scheduled job, not through the browser.

Step 6: Allow Cloudflare through your firewall

Illustration for Step 6: Allow Cloudflare through your firewall

If your host or a security plugin blocks Cloudflare's IP addresses, you will get 520 or 521. Allow them.

Step 7: Test again

Illustration for Step 7: Test again

Purge the Cloudflare cache and reload.

Still stuck?

If these steps do not solve it, we fix it for you for a flat $99. Full refund if we do not solve it within 7 days.

Related guides

Did this solve it? If not, email hello@sitefixlab.org with the exact error text and we will look into it. Try the problem finder.

Last updated 2026-11-22.