My Service Support

502 Status Code: What It Means and What to Do

Updated 2026-08-23 · 979 words

Be the first to rate this page

What is a 502 status code?

A 502 status code, also written HTTP 502 or "502 Bad Gateway", means a server that was passing your request along received an invalid answer from the server behind it. Your request arrived. Something inside the site broke while answering it.

The word "gateway" is the clue. Almost no large site is a single machine. A request usually crosses a delivery network, then a load balancer, then an application server, then a database. When a link in that chain answers with nonsense, or does not answer at all, the machine in front of it reports 502 to you.

Is a 502 error your fault or the site's?

The site's, in nearly every case. A 502 is generated by the site's own infrastructure after your request was accepted, so a broken cable at your end would produce a different symptom — a page that never loads at all, not a tidy numbered error.

There are two exceptions worth ruling out quickly. If every site you open shows 502, something between you and the internet is intercepting traffic: a corporate proxy, a filtering box, or a VPN. And if one site shows 502 only for you while friends load it fine, an old cached copy of the error or a stale session cookie can keep re-serving it.

How do I clear a 502 error as a visitor?

  1. Reload the page once. Many 502s come from a single request landing on one unhealthy server, and the next request lands somewhere healthy.
  2. Wait a minute, then reload again. Restarts and deployments cause short 502 windows that clear on their own.
  3. Force a fresh copy rather than a cached one. Hold the reload button, or use the browser's hard-reload shortcut.
  4. Open the same address in a private or incognito window. This bypasses your cookies and extensions in one move.
  5. Try the site on mobile data instead of wi-fi, or the other way round. If one network works and the other does not, the problem is on the path, not the site.
  6. Turn off any VPN, proxy or ad-blocking DNS and reload once more.
  7. Check whether other people are reporting the site as down before you spend more time on it.

If steps one to six change nothing, stop. There is no seventh thing a visitor can do to a server they do not own.

Why does 502 keep coming back on one site only?

Repeated 502s on a single site usually mean a partial outage rather than a total one. Part of the site answers and part does not, so the home page loads and the sign-in page fails, or the opposite. That pattern is normal during a deployment gone wrong.

A second common pattern: one region is broken and others are fine. Delivery networks serve you from a nearby location, so a fault in your city produces 502 for you and nothing for someone two states away. That is why "it works for me" from a friend does not mean you imagined it.

What if you got a 502 in the middle of a payment or a form?

Do not resubmit immediately. A 502 tells you the answer was lost, not that the action failed. The payment or the form may well have gone through on a server that then failed to report back.

  1. Wait a few minutes, then sign in again and check your order history, transaction list, or submitted-items list.
  2. Check your email for a confirmation. Confirmations are often sent by a different system that was never affected.
  3. Check your bank or card app for a pending charge before you pay a second time.
  4. Only if nothing appears in any of those places should you submit again.

Duplicate orders caused by an impatient second click are far more common than lost ones.

How is 502 different from 503 and 504?

  • 502 Bad Gateway — an upstream server replied, but the reply was invalid or the connection dropped mid-answer.
  • 503 Service Unavailable — the server is up and deliberately refusing work, usually because it is overloaded or in maintenance. This one is often intentional.
  • 504 Gateway Timeout — the upstream server never replied at all within the time allowed. Slowness rather than breakage.

For a visitor the response is the same in all three: reload, wait, come back. The distinction matters to the people fixing it, and it is worth quoting the exact number if you report the problem.

What causes 502 on a site you run?

The pattern is always the same shape: the front-end process could not get a sane response from the back-end process. In practice that means the application process crashed or was never started, it is listening on a different port or socket than the front end expects, it ran out of memory and was killed, the connection limit was reached, or a deploy replaced the running code while requests were in flight.

Start with the front-end server's error log rather than the application log. The front end is the component that decided to emit 502, and it records why — refused connection, reset connection, malformed header. That line names the cause faster than any amount of guessing.

When should you contact support?

Contact the site's support when the 502 persists past roughly half an hour, when it blocks something time-limited such as a filing or an appointment, or when it appears only on one specific page while the rest of the site is fine. That last case is easy for a support agent to miss and easy for them to fix once told.

Give them three things: the exact address of the page, the time you saw the error, and the number 502 itself. Screenshots help. If the site publishes a status page, check it first, and start from the company’s official website if you are not sure where their help section lives.

Was this page helpful?

Be the first to rate this page