Home502 What is a bad gateway error (and how can I fix it)?

502 What is a bad gateway error (and how can I fix it)?

MyImages – Micha / Shutterstock.com

502 Bad Gateway Error occurs when you try to visit a web page, but one web server receives the wrong response from another. Usually, the problem is with the website itself, and there is nothing you can do about it. Other times, this error is caused by a problem with your computer or networking devices.

502 What is a bad gateway fault?

502 Bad Gateway malfunction means that the web server you are connected to is acting as a proxy to send information from another server, but it has received a bad response from another server. This is called a 502 error because it is the HTTP status code that the web server uses to describe this type of error.

These adverse reactions can occur for a variety of reasons. It is possible that the server is overloaded or there are network issues between the two servers, and this is only a temporary issue. It is also possible that there is an incorrectly configured firewall or even a coding error, and this issue will not be resolved until these issues are resolved.

Like 404 errors, website designers can customize what the 502 error looks like. So, you can see 502 different looking pages on different websites. Websites may also use slightly different names for this error. For example, you can see things like:

  • HTTP Error 502 Bad Gateway.
  • HTTP 502.
  • 502 Service temporarily overloaded.
  • Temporary breakdown (502)
  • 502 Server Error: The server encountered a temporary error and could not complete your request.
  • 502 Bad Gateway Nginx.

Most of the time, it’s just a glitch on the server side of things that you can’t do anything about. Sometimes, it’s a temporary mistake, sometimes it’s not. Still, there are some things you can try at the end of your day.

Refresh the page.

Refreshing the page is always worth a shot. Sometimes a 502 error is temporary, and a simple refresh trick can work. Most browsers allow you to refresh a page by pressing Ctrl + R on Windows or Cmd + R on Mac, and also provide a refresh button somewhere on the address bar.

Click the Reload button.

It often doesn’t solve the problem, but it only takes a second to try.

Check if the site is closed to other people.

Whenever you fail to reach a site (for whatever reason), you can also check if it’s just you who are having trouble connecting, or if other people have the same problem. Is happening There are many tools available for this, but our favorites are isitdownrightnow.com and downforeveryoneorjustme.com. The two work pretty much the same. Type the URL you want to check, and you’ll get the result.

Server status check run on isitdownrightnow's website.

If you get a report that the site is closed to everyone, you can’t do much but try again later. If the report shows that the site is up, the problem may be at your end. This is a very rare 502 error, but it is possible, and you can try some of the things we describe in the next few sections.

Try another browser.

It is possible that a problem with your browser is causing a 502 bad gateway malfunction. An easy way to check this is to use different browsers and see if it works. You can use Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. If you also see a glitch in the new browser, you know it’s not a browser issue, and you should try another solution.

Clear your browser’s cache and cookies.

If a different browser test works, it is possible that your main browser has cached old or corrupt files, causing a 502 error. Trying to remove these cached files and open the website can solve the problem.

Clear cookies and site data in your browser to see if they are causing problems.

It’s definitely worth a try, and we have a simple guide for you on how to clear your history in any browser.

Related: How to clear your history in any browser.

Check your plugins and extensions.

If you use extensions on your browser, it is possible that one or more extensions are causing this problem. Try disabling all your extensions and then accessing the website. If the error then disappears, it is possible that a plugin is causing the problem. Activate your plugins one by one to find the culprit.

Disable extensions one by one so that anyone can cause problems.

Related: How to uninstall extensions in Chrome, Firefox and other browsers

Restart your devices.

So, you have used the site checking tool and determined that the site is right down to you. And, you have tried another browser and you have the same problem. So you know the problem is at your end, but it’s not your browser.

It is possible that your computer or your networking devices (Wi-Fi, router, modem, etc.) have some strange, temporary problems. A simple restart of your computer and your networking devices can help solve this problem.

Change your DNS servers.

Sometimes, DNS issues can cause 502 errors. Changing your DNS servers may not be okay, but it is possible. And it’s not too hard to do. Unless you change them yourself, your DNS servers will probably be set up by your ISP. You can convert them to third party DNS servers such as Open DNS or Google DNS, and this may solve the problem.

And there are other reasons why you might want to switch to DNS servers, such as better speed and reliability.

Related: The ultimate guide to changing your DNS server.