The Meaning of 502 Bad Gateway: What It Is and How To Use It

What is the meaning of a 502 bad gateway error, and how can you fix it? This article will cover several types of HTTP errors.

Your writing, at its best

Compose bold, clear, mistake-free, writing with Grammarly's AI-powered writing assistant

Do you know what it means to get a 502 bad gateway error on a web page? Do you know how to fix it? 

This article will tell you what a 502 bad gateway error is, how to troubleshoot a 502 bad gateway error, and all about other common HTTP server responses. Keep reading to learn more about the 502 bad gateway error!

What Does 502 Bad Gateway Mean?

A 502 bad gateway error is an HTTP response that you might see when the webserver you are connected to cannot get a good response from the other DNS server. You might see this error represented in different ways depending on the design of the website or browser windows, like Microsoft Internet Explorer, Google Chrome, or Safari on Mac:

  • HTTP 502
  • HTTP Error 502 Bad Gateway
  • 502 Server Error: The server has encountered a temporary error and was unable to complete your request
  • Temporary Error (502)
  • 502 Service Temporarily Overloaded
  • 502 Bad Gateway Nginx
  • 502 Proxy Error

There are various reasons why you might receive this type of HTTP error code. The 502 error means that the other server (not your own) cannot process the request for the web page. 

Sometimes this can mean that the client-side server is overloaded or your server and the other server have network issues. In more serious cases, that could be a firewall issue or a coding error. You can look at your error log to check for 502 bad gateway errors from your IP address.

How to Fix a 502 Bad Gateway Error: Troubleshooting

Since a 502 error is a client-side error, there may be nothing you can do about it if it is a larger problem. However, if it is a temporary error, you might be able to try one of the below strategies to get connected. 

Below, this article will help you troubleshoot common causes of the 502 error. There are also many tutorials online that will help you troubleshoot this error. 

Refresh and Clear Your Cache

One of the easiest ways to troubleshoot this proxy server error is to try refreshing the page. Since this can be a temporary error due to system overload, reloading the page might solve it. You can often refresh by clicking Ctrl-R or Cmd-R, but it depends on your operating system and browser.

You can also try a different browser. If that works, it might mean your main browser cache may need to be cleared. 

Check Your Networking Equipment

If your router or modem is down, you might not be able to connect to a website at all. Always make sure that you are connected to your router and modem and that your internet is up and running when you see an error. If it is a client server-side error, this may not work — but it’s always worth a shot.

Disable Your CDN or Firewall

If your firewall is improperly configured, it can make your computer think that visiting a certain website is an attack on your server, therefore rejecting it. If this is the case, you may need to adjust your firewall settings to fix the issue.

What Are Other HTTP Status Codes?

There are numerous other HTTP response status codes that you might see. These responses are grouped into five different classes: the 100s, 200s, 300s, 400s, and 500s. Keep reading to learn all about the standard responses in this list.

100 Status Codes

100 HTTP status response codes indicate an informational response:

  • 101 Switching Protocols
  • 103 Early Hints
  • 100 Continue
  • 102 Processing

200 Status Codes

Status codes in the 200 range indicate a successful response:

  • 200 OK
  • 207 Multi-Status
  • 203 Non-authoritative Information
  • 204 No Content
  • 226 IM Used
  • 202 Accepted
  • 208 Already Reported
  • 206 Partial Content
  • 201 Created
  • 205 Reset Content

300 Status Codes

HTTP status response codes beginning with the number 3 are all types of redirection messages:

  • 303 See Other
  • 305 Use Proxy
  • 301 Moved Permanently
  • 302 Found
  • 307 Temporary Redirect
  • 308 Permanent Redirect
  • 300 Multiple Choices
  • 304 Not Modified

400 Status Codes

Uh oh! If you get an HTTP status response in the 400 range, this indicates a client error:

  • 428 Precondition Required
  • 411 Length Required
  • 416 Requested Range Not Satisfiable
  • 499 Client Closed Request
  • 451 Unavailable For Legal Reasons
  • 408 Request Timeout
  • 429 Too Many Requests
  • 415 Unsupported Media Type
  • 413 Payload Too Large
  • 407 Proxy Authentication Required
  • 418 I’m a teapot
  • 402 Payment Required
  • 417 Expectation Failed
  • 400 Bad Request
  • 409 Conflict
  • 405 Method Not Allowed
  • 423 Locked
  • 403 Forbidden
  • 431 Request Header Fields Too Large
  • 406 Not Acceptable
  • 424 Failed Dependency
  • 422 Unprocessable Entity
  • 401 Unauthorized
  • 410 Gone
  • 414 Request-URI Too Long
  • 404 Not Found
  • 421 Misdirected Request
  • 426 Upgrade Required
  • 444 Connection Closed Without Response
  • 412 Precondition Failed

500 Status Codes

Finally, status codes beginning with the number 5 indicate server errors:

  • 511 Network Authentication Required
  • 503 Service Unavailable
  • 501 Not Implemented
  • 504 Gateway Timeout
  • 508 Loop Detected
  • 510 Not Extended
  • 500 Internal Server Error
  • 505 HTTP Version Not Supported
  • 599 Network Connect Timeout Error
  • 507 Insufficient Storage
  • 506 Variant Also Negotiates


A 502 Bad Gateway error is an invalid response that you might see on a web page. This occurs when your server cannot contact the hosting provider or upstream server. If this error occurs, the website’s functionality will be temporarily down.


  1. What does HTTP mean? | Your Dictionary
  2. HTTP 502 status code (Bad Gateway) | Amazon CloudFront 
  3. What is a 502 Bad Gateway Error (And How Can I Fix It)? | HowToGeek