Account

Error guide / 502 Bad Gateway

How to fix a 502 Bad Gateway error

A 502 Bad Gateway error means the server that took your request passed it on to another server and got a broken response back. Usually a middleman such as a proxy or CDN could not get through to the main server. The site is down while this lasts, but the problem is often temporary.

Check your site

>

What causes it

The usual cause is an overloaded or crashed backend: a PHP process hangs, an update breaks something, or a short traffic spike overloads the server. Wrong proxy or CDN settings produce the same error.

How to fix it

  1. Refresh the page after a minute or two. Many 502 errors clear on their own after a brief glitch.
  2. Open the site from another device or network to rule out your browser.
  3. Clear your browser cache, and the CDN cache too if a CDN is enabled (for example in Cloudflare).
  4. Check the error log: a 502 is often caused by a PHP process that crashed or timed out.
  5. Restart the application or the PHP pool if you have access, or ask support to do it.
  6. If the error does not go away, contact your host: the server itself may be overloaded.

Related errors