520 error after going to cloudflare

Hi all. Since i moved to cloudflare yesterday I keep on getting a 520 error. While the page is loading it shows a 502 error and then once it is fully loaded it shows a 520 error. I have contacted my host and according to them everything seems fine and they can’t seem to find any problems on their side. Any information as to what could be causing this?

my website is teenytinyrascals.com

Edit: now it seems to show a 502 error and no longer shows a 520 error

Hi @jethroknowles,

I just get a 502.

The 502/504 errors are caused by a problem connecting to an upstream server - meaning your server is trying to initiate a process and this fails to work as expected or times out. In most cases of 502 / 504 errors, back-end servers are not communicating correctly. When this happens, you will see color page with Cloudflare branding and the Error 502 Bad Gateway or Error 504 Gateway Timeout. Review this Community Tip for fixing 502 or 504 gateway errors.

If you also see a 520:

A 520 error occurs when the connection started on the origin web server, but that the request was not completed. The most common reason why this would occur is that either a program, cron job, or resource is taking up more resources than it should causing the server not to be able to respond to all requests properly.

Review the Quick Fix Ideas in this Community Tip for troubleshooting suggestions.

Both indicate an issue on your hosts side.

1 Like

Thanks for the information.

My host had to whitelist cloudflares IP address range in order for everything to work, after they did this everything functioned normally

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.