how To Fix Error 520 Cloudflare

520 origin error cloudflare-nginx
Contents
Resolving the Common Reasons for Error 520
Now that you have your error log, search through it and see if you notice any one of the issues below. Then, follow the steps below to resolve the issue.
Origin Server PHP Application Crashed
One common issue that causes error 520 is that one of the PHP applications have crashed on your server. Restarting PHP will fix the error.
Step 1
Using SSH, you can enter the command below for Apache servers:
apache2ctl restart
For Nginx servers, you can restart PHP using the command below:
service nginx restart
Restart PHP in MyKinsta
If your site is hosted with Kinsta, you can restart PHP in a few clicks.
Step 1
Log into MyKinsta and click on Sites on the left. Then, click on your site from the list.
How To Fix Cloudflare Error 520: Web Server Is Returning An Unknown Error
- Search Error Logs For Device Resets
- Restart PHP Applications On Your Origin Server
- Whitelist Your Cloudflare Origin Server IP Address
- Check Response Headers From Your Cloudflare Origin Web Server
- Lighten Your Cookie Load
- Correct Your Cloudflare Origin Server DNS Settings
- Examine Your Server Traffic
- Check For Non-HTTP Errors In Your Cloudflare Logs