502 Bad Gateway cloudflare

Hi, newbie question here

Just cannot fathom it. My WP site is working perfectly (https://www.panary.co.uk/) and resolves correctly when logged in as an Admin. However, log out and return to the home page and multiple pages then show the error message " 502 Bad Gateway - Cloudflare"

It’s not my server problem here (CF message would show that), but Cloudflare. And the thing is it appears random and affects different pages (sometimes the root/Home page) and at other times various subpages.

  1. Tried clearing cache (both WP and CF)
  2. Disable dev mode
  3. Multiple browsers devices and incognito

… and now at the point of taking CF out altogether

So, my questions are

  1. Why is this?
  2. How do I resolve
  3. How do I do this?

Just really new to this and really want to learn more and really get to the bottom of this :confused:

Thanks for your help.

Are you seeing a white screen like what’s shown in quick fix idea 4 in this Tip? Community Tip - Fixing Error 502 / 504: Bad Gateway


Yes, that’s the one.

As a result of reading this post, I have disabled WP Super Cache atm, and all seems to be working.

So, wondering if there is some ‘clash’ between how the WP Super Cache and CF caching is working. Wonder if there is dome post which explains this :confused:

1 Like

Sorry for big dump of links (I’d start with first one), but here’s the best collection of articles I’ve seen on the topic:

Can I use WordPress caching plugins like Super Cache or W3 Total Cache (W3TC) with Cloudflare?
What does Polish do?
Using Polish to compress images on Cloudflare
What image formats do Polish and Mirage work with?
Does Cloudflare offer image optimization features?

Thanks, Cloonan. Very helpful.

1 Like

This topic was automatically closed after 31 days. New replies are no longer allowed.