How to fix: 502 Bad Gateway Error in Chrome?

The other day I tried to access a website through a website Chrome but was always greeted with the 502 Bad Gateway Error message. While trying to understand this query better, I stumbled upon it Google support forum page and found out that I wasn’t the only one with this problem. So what led to this bug?

Well, if your browser sends an invalid request to the web server (which acts as a proxy / gateway), then it in turn gives the response in the form of the HTTP status 502 code. At the end you will be greeted with the error message 502 Bad Gateway.

So how do you fix this problem? Well, for the most part, the problem comes from the server side. And how these upstream servers are handled is beyond your control. The website administrator needs to fix the problem.

Other than that, sometimes the problem could be related to your browser or internet settings which you can easily adjust and thus fix the 502 Bad Gateway Error.

And that is exactly what this guide is intended to make you aware of. So without further ado, let’s get started.

contents

Check the website’s server status

First and foremost, you should check that the site is up and running. You can do this with the help of a third-party site such as Down detector or try a different web browser. If there are no problems with the server, try reloading the affected website.

Use the Ctrl + R. Keyboard shortcuts or click the

Reload arrow symbol
is located to the left of the Omnibox. If the problem persists, then it’s time to try some other fixes listed below.

Identify and remove extensions using Incognito Mode

Chrome’s incognito mode is used for a safer browsing experience. Aside from that, it also offers a near-warehouse experience by disabling all third-party trackers and extensions by default.

Therefore, if the problem is with one of these add-ons, it will not show up in this private mode. Use the Ctrl + layer + n Keyboard shortcuts to open a new incognito window.

Switch to private incognito browsing mode in Chrome

Now try to access the site. Now, if the site is functioning normally, it is time to say goodbye to one of these enhancements.

Here are the steps to disable and remove the culprit extension from chrome:

  1. Open a normal window and head over to the chrome: // extensions / Page.
  2. Now turn off the toggle next to each of the extensions until you can’t recreate the problem again.
  3. Hit the Removed Button next to the last extension that came out as the culprit.
    Disable or remove browser extensions from the Google Chrome

While these extensions increase overall productivity, if they indicate a bug, it is better to remove them from that very point.

Clear browser cache and cookies

If a lot of temporary data accumulates over time, it may conflict with the proper functioning of the PC.

Although not related to the network side, some are user could fix that 502 Bad Gateway Problem after doing this fix.

Here are the quick steps on how to clear browsing data chrome:

  1. begin Google Chrome Browser.
  2. Visit the Clear browser data Page by entering the following url
    chrome://settings/clearBrowserData
  3. Now choose Cookies and other website data and Cached images and files.
  4. Hit the delete data click and wait for the process to finish.
    Clear browsing data options in Chrome Browser
  5. Now check whether you can visit this site or not.

While this tweak worked for some, it turned out to be a temporary fix. Users had to clear their browser’s cache and data every few days, which in turn disrupted their normal workflow.

Clear DNS cache

The domain server’s cache stores temporary data related to the websites you visit. Since the browser could get the data directly from the cache, this leads to a faster loading speed of these pages.

But even if the cache data were damaged, it would have negative consequences. Hence, it is best to clear the DNS cache.

Here are the steps to clear DNS cache from Windows operating system:

  1. Go over to the Start menu and look for CMD.
  2. Then start this command prompt Administrator window.
    Run command prompt as administrator
  3. Now enter the following command and press Enter to flush the entire DNS-related cache.
    ipconfig /flushdns

    flushdns ipconfig windows

  4. Once that’s done, restart the browser and see if the 502 Bad Gateway Error has been resolved or not.

Clearing the DNS cache can slow the website loading speed the first time it is opened. But if it fixes the 502 Bad Gateway issue, then it’s worth the trade off.

Change network DNS addresses

Your ISP will provide you with the standard DNS, but you can always switch to a different one. And that’s what we would do here.

By switching to Google’s public DNS, we could check whether the problem is related to our standard DNS or not.

Here are the steps to change the DNS address in the Windows operating system:

  1. Right click on the WiFi symbol present in the system tray and select Open the network and internet settings.
    Open the network and internet settings in Windows 10
  2. Choose one Change adapter options and you get to the list of available networks.
    Change adapter settings in the Windows operating system
  3. Right click on the connected network and select Properties.
  4. Now scroll to the Internet protocol version 4 Section and click properties.
    Internet connection characteristics WiFi IPv4.
  5. Then choose Use the following DNS server addresses Opportunity.
  6. Type in 8.8.8.8 under Preferred DNS Address and 8.8.4.4 under Alternate DNS Address.
    Use the Google DNS settings in the Internet Properties option
  7. Hit it at last OK to save the changes and try to access the site.

If you can do this now, it is recommended that you stick with this DNS itself, at least for now.

Note that this change is made at the device level and is only adopted by the device (laptop / PC) on which you performed the steps. All other devices connected to this network continue to use the original DNS itself.

Conclusion: Fix 502 Bad Gateway Nginx

With that in mind, we round off this guide on how to fix the 502 Nginx error on faulty gateway in Chrome. We have shared several different types of workarounds that might be successful for you.

While the problem generally stems from the website server, the browser-side tweaks mentioned above fix the problem in some cases.

In my case, I first got the website on a. checked Microsoft Edge Browser to see if the problem was on my side. And yes, the page was loaded Edge Browser. So I deleted that chrome the browser’s browsing data as well as the DNS cache that fixed the problem.

Let us know in the comment section which results have been positive for you.

Finally, here are the recommended web browsers for your computer and mobile phone that you should try.

windowMac OSiOSAndroidLinux
Chrome windowChrome MacChrome iOSChrome AndroidFirefox Linux
Firefox windowSafari MacSafari iOSEdge AndroidChrome Linux
Edge windowFirefox MacEdge iOSSamsung internetEdge Linux

If you have any thoughts on this How to fix: 502 Bad Gateway Error in Chrome?, feel free to stop by downstairs Comment box. If you find this article helpful, consider sharing it with your network.

Please also subscribe to ours BrowserLike YouTube Channel for helpful video tutorials.

Related Posts