Press "Enter" to skip to content

Error 502 Bad Gateway – 5 quick fixes

What does Error 502 Bad Gateway mean?

Error 502 Bad Gateway is a HTTP status code. It is a general pointer that there’s something that is not right with a website’s server communication. 

This status code shows that the server, while serving as a gateway or proxy, received an invalid response from an inbound server it accessed while trying to achieve the request.

If you want to visit a website on the Internet, your browser sends a request to a server connected to the web. This server receives the request and applies a process to deliver back the resources you demanded, including an HTTP header and an HTTP status code.

In case everything works, users are not going to see the HTTP status code. Simply, this is the way servers interact with each other. However, if something fails, the server will inform you with exactly this code.

Error 502 Bad Gateway can be displayed like:

  • 502 Bad Gateway
  • Temporary Error (502)
  • HTTP 502
  • 502 Proxy Error
  • 502 Service Temporarily Overloaded
  • 502 Server Error: The server faced a temporary error and is not able to complete your request.
  • Bad Gateway: The proxy server got an invalid response from an upstream server.

Let’s observe some of the quick fixes that could help you. 

Reload the page.

The first thing you could try when you face an Error 502 Bad Gateway is simply to wait a moment and reload the page. Of course, the host or the server could be just overloaded. If it is so, the website should come right back.

Also, another thing to quickly try is opening the website through a different browser. 

You can find platforms that can check if the website is actually down or the problem is on your side.

Remove Your Browser Cache

If the error continues, it could be the possibility that your browser cache holds outdated and corrupted data. If this is the case, you should clean the browser cache to fix this error.

It is important to know that removing the cache might lead to losing some essential browser data or bookmarks and preferences, which you set. Therefore, you should export your data from the browser, and after you finish removing the cache, import it back to prevent losing data.

Check for any DNS changes.

A possible reason for facing Error 502 Bad Gateway could be a DNS issue. For example, the domain does not reveal the right IP. 

It is necessary to be patient for things to completely propagate, in case you recently migrated your website to a new host. The required time depends on the TTL value of your DNS records.

Briefly Disable Firewall or CDN

Perhaps there could be an issue with your firewall or Content Delivery Network (CDN). In case you are using a provider of CDN, you can simply disable your CDN for a moment. Then you can test to reach your website again. 

This error is possible to occur sometimes with providers of DDoS protection and mitigation or fully proxy services. This is because they hold an extra firewall in-between. It can often happen if you are using a free plan. 

Suggested article: Error 404 – how to fix it?

Reach your host.

In case you can’t solve the problem on your own, give a call to your host company. They can observe what is going on and deliver more information about the situation.

Perhaps the issue could be on their end, and they could be able to fix it easily. They can also help if the problem is particularly associated with your website.

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *