Skip to content

502, 503 or 504 Error on Your Website: What Each One Means and What to Check

  Posted on 19 Oct, 2026
  Web Applications
502, 503 or 504 Error on Your Website: What Each One Means and What to Check

A 502 Bad Gateway means a server in front of your website (a proxy, load balancer or CDN) got a broken reply from the application behind it. A 503 Service Unavailable means the server is up but refusing work for now, usually because it is overloaded or in maintenance. A 504 Gateway Timeout means the server in front waited for the application behind it and gave up. All three are server-side faults, not a problem with your visitor's browser.

None of them tells you the exact cause, but each narrows down where to look. Recurring errors are a job for a team that provides web application development and support; the checks below are the ones an owner can do safely first.

What do 502, 503 and 504 errors usually mean?

They mean the request reached your infrastructure but could not be completed, and the number hints at which part failed. Most business websites have two layers: a front server (a proxy, load balancer or a CDN such as Cloudflare) and the application and database behind it. A plain 500 error, by contrast, is the generic report that the server hit an unexpected problem.

502 Bad Gateway

MDN defines 502 as a server acting as a gateway or proxy receiving an invalid response from the upstream server. In practice the application behind the proxy has usually crashed, is restarting, or has stopped accepting connections. It often appears for a minute or two during a deployment.

503 Service Unavailable

RFC 9110, the HTTP standard, describes 503 as the server being currently unable to handle the request because of a temporary overload or scheduled maintenance. MDN adds that some applications deliberately reject requests with a 503 when memory, CPU or connection limits are reached. So a 503 points to maintenance mode left switched on, a traffic spike, or a hosting plan that has hit its resource limits.

504 Gateway Timeout

MDN defines 504 as a gateway or proxy not getting a response in time from the upstream server. The application is probably running, but something is too slow: a heavy database query, a report or export, or a third-party service (payments, shipping, email) that is not answering.

What does a Cloudflare error page tell me about where the fault is?

It usually tells you the fault is at your own server, not at Cloudflare. As of October 6, 2026, Cloudflare's 502 and 504 documentation says Cloudflare shows a Cloudflare-branded 502 or 504 page when your origin web server itself answered with that error. A 502 or 504 that originates from Cloudflare appears instead as a plain page without the Cloudflare branding. The same page says that if the error does not mention Cloudflare at all, you should contact your hosting provider.

For 503, Cloudflare's 503 documentation says the error was generated by Cloudflare if the error page's HTML contains "cloudflare" or "cloudflare-nginx"; otherwise it came from your origin server, and the advice is to ask your host whether it is rate limiting requests.

So the Cloudflare name on an error page does not mean Cloudflare is down. Screenshot the whole page, including the small text at the bottom, for your developer or host.

Does it matter whether the error is constant or comes and goes?

Yes, because the pattern points to different causes. A constant error on every page usually means something is fully down: the application process has stopped, maintenance mode is on, or the hosting account is suspended or out of resources.

An intermittent error usually means the site is working but at its limit. Errors only at busy times suggest capacity. Errors at the same time each day suggest a scheduled job such as a backup or import. Errors on one page only (checkout, search, a report) suggest one slow operation, the typical 504 pattern.

What can I safely check in about 10 minutes?

You can check where the problem is and when it started without touching the server. None of these steps changes anything.

  1. Open the site on a phone using mobile data, not office Wi-Fi. MDN notes that a 502 or 504 can occasionally be a visitor-side network issue if the site works for other people.
  2. Try the home page, one inner page and the admin login. Note whether every page fails or only some.
  3. Screenshot the error page in full and write down the exact code and wording.
  4. Open your hosting provider's status page and your CDN's status page and look for a current incident.
  5. Log in to the hosting control panel and look at the resource usage graphs (CPU, memory, processes) and any notices about limits or suspension.
  6. Check the billing page and your email for an overdue invoice or a suspension warning from the host.
  7. Write down when it started and what happened around then: a deployment, a plugin update, an email or ad campaign, a traffic spike, or a scheduled job.

What should I not do?

Do not make changes you cannot undo while you still do not know the cause. In particular:

  • Do not change DNS records, switch the CDN off, or point the domain somewhere else.
  • Do not restore a backup, delete files or cache folders, or edit configuration files.
  • Do not restart the server repeatedly. One restart may be fine if your host recommends it, but repeated restarts can interrupt jobs that are part-way through.
  • Do not buy a bigger hosting plan in a hurry. It helps only if the cause is capacity.
  • Do not resubmit an order or payment form that ended in an error until you have checked whether the first attempt went through.

When should I call a developer, and what should I have ready?

Call a developer if the error is constant for more than a few minutes with no incident on the status pages, if it keeps coming back, or if it affects checkout, login or anything that handles money. Open a ticket with your hosting provider at the same time, because the host can see server-level problems that you cannot.

Have this ready:

  • The exact error code, a full screenshot, and the URL that failed.
  • When it started, with your time zone, and whether it is constant or intermittent.
  • Which pages are affected and which still work.
  • What changed recently: deployments, updates, campaigns, new integrations.
  • Who your host, CDN and domain registrar are, and who has login access to each.

The developer will then read the server logs and check the application process, the database and any slow queries. Those steps need server access and are not something to attempt by guesswork.

How do I stop it happening again?

Fix the underlying cause, then add early warning. Ask for uptime monitoring that alerts a named person. Have heavy work such as imports, exports and bulk emails moved into background jobs that run outside busy hours. Deploy at quiet times with a proper maintenance page; RFC 9110 allows a 503 response to carry a Retry-After header suggesting how long to wait before retrying.

If traffic has simply outgrown the server, review the plan with someone who can read the usage data; our guide to choosing cloud hosting for business applications covers what to compare.

Quick answers

What is the difference between a 502 and a 504 error?

A 502 Bad Gateway means the front server received an invalid response from the application behind it. A 504 Gateway Timeout means it received no response in time. A 502 suggests a crashed or restarting application, and a 504 suggests a slow one.

Is a 503 Service Unavailable error my hosting company's fault?

Not necessarily. A 503 means the server is temporarily unable to handle requests because of overload or maintenance. The cause can be a traffic spike, maintenance mode left on, resource limits on your plan, or an incident at the host, so check the host's status page and your usage graphs.

Does a Cloudflare 502 page mean Cloudflare is down?

Usually not. Cloudflare's documentation, checked on October 6, 2026, says a Cloudflare-branded 502 or 504 page is shown when your own origin server returned that error. A 502 or 504 that originates from Cloudflare appears as a plain page without the branding.

Will a 502, 503 or 504 error fix itself?

Sometimes. A short burst during a deployment or a brief traffic spike often clears within minutes. An error that stays for more than a few minutes, or keeps returning, needs someone to read the server logs.

Conclusion

A 502 points to a crashed or restarting application, a 503 to overload or maintenance, and a 504 to something upstream that is too slow. Note the code, the time, the affected pages and anything that changed, and avoid changes you cannot reverse.

If you have no developer available, you can contact Entrant Technologies and we will take a look.

Entrant Technologies
Post written by
Entrant Technologies is one of the leading web, software, iPhone & Android app development company which deliver robust results for great brands worldwide. We deliver software solutions that meet the customers and business expectations.
View all posts by Entrant Technologies →
Latest Blogs
 
You update an old mobile app by first auditing it, then rebuilding it with the current Apple and Google development kits, replacing the third-party libraries that have gone stale, and retesting it on ...
on 19 Oct, 2026 Read More
 
A 502 Bad Gateway means a server in front of your website (a proxy, load balancer or CDN) got a broken reply from the application behind it. A 503 Service Unavailable means the server is up but refusi ...
on 19 Oct, 2026 Read More
 
Yes, add chat to your business website if a named person can answer it during working hours, and start with one channel only. Choose a click-to-WhatsApp button if your customers already use WhatsApp e ...
on 19 Oct, 2026 Read More