502 Bad Gateway Error in Chrome?


Learn how to fix the 502 Bad Gateway Nginx Error in Google Chrome. You try these working fixes to eliminate the Bad Gateway alert and load the website.

Just the other day I was trying to access a website via Chrome but was always being greeted with the 502 Bad Gateway error message. Upon trying to further understand this query, I stumbled upon this Google Support Forum page and found out that I wasn’t the only one getting bugged with this issue. So what led to this error?

Well, when an invalid request is sent from your browser to the webserver (that acts as a proxy/gateway), then the latter will in turn give the response in terms of HTTP Status 502 Code. On your end, you will be greeted with the 502 Bad Gateway error message.

502 Bad Gateway Nginx Error on Browser

So how could one rectify this issue? Well, in most cases, the issue stems out from a server-side. And dealing with these upstream servers is not something that is under your control. The website administrator has to rectify the issue.

With that said, sometimes, the issue could well be related to your browser or internet settings which you could easily tweak and hence fix the 502 Bad Gateway Error.

And this guide shall make you aware of just that. So without further ado, let’s get started.

Check Website Server Status

First and foremost, you should verify that the site is up and running. For that, you may take the help of a third-party site such as DownDetector or try a different web browser. If there are no issues with the server, then try reloading the concerned website.

Reload Webpage in Browser with refresh icon

For that, use the Ctrl + R shortcut key combinations or click the

reload arrow icon situated left of the Omnibox. If the issue is still persistent, then it’s time to try out some other fixes listed below.

Identify and Remove Extensions via Incognito Mode

Chrome’s Incognito Mode is used for a secure browsing experience. Apart from that, it also provides a near-about stock experience by disabling all the trackers and third-party extensions by default.

Consequently, if the issue is because of any of these add-ons, then it wouldn’t appear in this private mode. Use the Ctrl + Shift + N shortcut key combinations to bring up a new Incognito window.

Switch to Incognito Private browsing mode in Chrome

Now try accessing the site. If the site working normally now, then it’s time to bid adieu to one of those extensions.

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

  1. Open a normal window and head over to the chrome://extensions/ page.
  2. Now disable the toggle next to each of the extensions until you are no longer able to re-create the issue.
  3. Hit the Remove button next to the last extension that came out as the culprit.
    Disable or Remove Browser Extensions from the Google Chrome

While these extensions do end up adding more to the overall productivity, but if it points to an error, then it’s better to remove them at that very instance.

Clear Browser Cache and Cookies

If a lot of temporary data gets accrued over the due course of time, then it could conflict with the proper functioning of the PC.

While they aren’t related to the network side, some users were able to rectify the 502 Bad Gateway issue after carrying out this fix.

Here are the quick steps to clear browsing data from chrome:

  1. Launch Google Chrome browser.
  2. Visit the Clear browsing data page by entering the below URL
  3. Now select Cookies and other site data and Cached Images and Files.
  4. Hit the Clear data button and wait for the process to complete.
    Clear browsing data options in Chrome browser
  5. Now check if you can visit that site or not.

While this tweak has worked out for some, it turned out to be a temporary fix. Users had to delete the browser’s cache and data after every few days, which in turn ended up disrupting their normal workflow.

Clear DNS Cache

Domain Server’s cache stores temporary data related to the websites you visit. Since the browser could directly pick up the data from the cache, it results in a faster loading speed of these sites.

However, even if the cache data gets corrupted, it would have negative consequences. So the best bet is to delete the DNS cache.

Here are the steps to clear DNS Cache from Windows OS:

  1. Head over to the Start Menu and search for CMD.
  2. Then launch this Command Prompt window as an Administrator.
    Run Command Prompt as Administrator
  3. Now type in the below command, and hit Enter to clear all the DNS-related cache.
    ipconfig /flushdns

    flushdns ipconfig windows

  4. As soon as it’s done, restart the browser and verify if it fixed the 502 Bad Gateway Error or not.

Deleting the DNS cache might slow down the loading speed of the website when it opens for the first time. But if it fixes the 502 Bad Gateway issue, then it is worth the trade-off.

Change Network DNS Addresses

Your ISP provides you with the default DNS, however, there’s always an option of switching over to another one. And this is what we would be doing here.

By switching over to Google’s Public DNS, we would be able to verify if the issue was related to our default DNS or not.

Here are the steps to change DNS address in Windows OS:

  1. Right-click on the WiFi icon present on the taskbar, and select Open Network and Internet Settings.
    Open Network and Internet Settings in Windows 10
  2. Select on Change Adapter options and it shall take you to the list of available networks.
    Change Adapter Settings in Windows OS
  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 WiFi IPv4 Properties.
  5. Then select Use the Following DNS server addresses option.
  6. Type in under Prefered DNS Address, and under Alternate DNS Address.
    Use Google DNS settings in Internet Properties Option
  7. Finally, hit OK to save the changes and try accessing the site.

If you can do so now, then it’s recommended sticking with this DNS itself, at least for the time being.

Do keep in mind that this change is device level and will only be adopted by the device (Laptop/PC) on which you have carried out the steps. All the other devices connected to this network will continue to use the original DNS itself.

Bottom Line: Fix 502 Bad Gateway Nginx

On that note, we round off this guide on how to fix the 502 Bad Gateway Nginx Error in Chrome. We have shared different types of workarounds that might spell out success for you.

While the issue generally stems out from the website server, in some instances the aforementioned browser-side tweaks do end up fixing the issue.

In my case, I first checked the website on a Microsoft Edge browser to verify if the issue was on my end. And yes, the page was loading on Edge browser. Hence, I cleared the chrome browser’s browsing data, as well as the DNS cache that rectified the issue.

Do let us know in the comments section which one managed to give out favorable results for you.

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

If you’ve any thoughts on How to Fix: 502 Bad Gateway Error in Chrome?, then feel free to drop in below comment box. If you find this article helpful, please consider sharing it with your network.

Also, please subscribe to our BrowserHow YouTube channel for helpful videos tutorials.

Source link

Trả lời

Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *