Cloudflare Error 520 and 524: Unknown Error and Timeout
520 is an unexpected origin response; 524 is a timeout.
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.
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

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

Very large headers or invalid response headers cause 520. Look for plugins that set huge cookies.
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

Run big imports and backups from the server, or by a scheduled job, not through the browser.
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

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
- Writing Clear Error Reports: Screenshots, URLs and Steps
- WordPress Tag and Date Archives Duplicate Content: Settings
- WordPress Permalinks Change: Redirect Old URLs and Avoid 404s
- Error Establishing a Database Connection in WordPress: Full Checklist