Skip to content
  • GDPR-compliant
  • 100% hosting in Germany
  • Personal contact
  • Support included
  • Provisioning within 24 hours
Error & Status Codes 2 min read

HTTP status code 502 Bad Gateway: causes and solutions

In short

A 502 Bad Gateway means: an intermediary server - such as the web server in front of PHP, a proxy or a CDN - received no valid response from the actual application server. The error often disappears again after a short time.

What does status code 502 mean?

Modern websites run through several stations: the web server accepts the request and passes it on to PHP or to another server. If this downstream station returns a faulty response or none at all, the web server reports 502 - it is the "gateway", the cause lies behind it.

Typical causes

  • A PHP process crashed during the request, for example due to a fatal error in a plugin or extension
  • Brief restarts of services, for example during updates
  • With an upstream proxy or CDN: the origin server is unreachable or responds incorrectly
  • Very large response headers, for example due to too many or too large cookies
  • An incorrectly configured forwarding to an internal service or port

Solution for visitors

  • Reload the page after a few seconds - many 502 errors are only short-lived.
  • Delete the website's cookies if the error only occurs in your browser.
  • If the error persists, contact the operator of the website.

Solution for site operators

  1. Check the error log: it shows whether PHP aborted with a fatal error and in which file (reading log files).
  2. Undo recent changes: if the error occurred after an update, deactivate the affected plugin or theme or restore a backup.
  3. Check the PHP version: is your system compatible with the selected PHP version?
  4. Proxy or CDN: check whether your website is reachable directly - without the upstream service. If you use ShieldCache or our CDN, we will look at both sides together with you.
  5. If the error occurs without any change on your side or persists for longer, contact our support team. Tell us the domain, time and affected address.

Was this article helpful?

New to SpeedIT Solutions?

Hosting where you know someone.

What you are reading here is what we put into practice for our customers every day. Based in Isernhagen since 2009 - with dedicated contact persons rather than a call centre.

  • 100% hosted in Germany
  • GDPR-compliant
  • Dedicated contact person
  • Provisioning within 24 hours
4.9 88 reviews on Expeero

Bester Host

Nachdem ich in den letzten Jahren mehrmals aus verschiedenen Gründen gewechselt habe, kann ich jetzt, hier bleibe ich treuer Kunde.
Jan R.Recommends us · 08/07/2026

100 % recommend us · Expeero

All reviews on HOSTtest (opens in a new window)

You might also be interested in:

Personal support

Of course, our support team is also happy to assist you personally. If you cannot find what you are looking for in our knowledge base or require personalised support, please do not hesitate to contact us. We’re here to help you and to ensure that your experience with our products and services is as smooth and enjoyable as possible.