How to fix 502 Bad Gateway Error: This error happens because the server which acting as gateway or proxy tried to get the main server to satisfy the request has obtained an invalid or no answer at all. Occasionally empty or incomplete headers caused by broken connections or server side issues can lead to Error 502 Bad Gateway when accessed using a proxy or gateway.
According to the RFC 7231, 502 Bad Gateway is an HTTP status code described as
The 502 (Bad Gateway) status code indicates that the server while acting as a gateway or proxy, received an invalid response from an inbound server it obtained while attempting to meet the request.
Various types of 502 Bad Gateway error you may see:
- 502 Bad Gateway
- HTTP Error 502 — Bad Gateway
- 502 Service Temporarily Overloaded
- Error 502
- 502 Proxy Error
- HTTP 502
- 502 Bad Gateway NGINX
- Twitter over ability is a 502 Bad Gateway error
- Windows Update fails due to 502 error screens WU_E_PT_HTTP_STATUS_BAD_GATEWAY
- Google displays Server error or just 502
You do not have any control over 502 error since they are server side, but sometimes your browser has been tricked into displaying it, so there are few troubleshooting steps which you may try to repair the matter.
How to mend 502 Bad Gateway Error
Be certain to create a restore point only in case something goes wrong.
FIX 1: Reload the Internet Page
If you are unable to visit a particular web page due to 502 Bad Gateway Error, then do wait for a couple of minutes before again attempting to get the site. An easy reload after waiting for a minute or so can fix this issue with no problem.Use Ctrl + F5 to reload the web page since it bypasses the cache and again check if the matter is resolved or not.
If the above step did not help, then it might be a perfect idea to shut everything you are working on and restart your browser. Then again the same site which was providing you 502 Bad Gateway Error and see whether you were able to repair the error if not then proceed to the next method.
FIX 2: Try a different browser
It may be possible that there are some difficulties with your existing browser, so it is almost always an excellent idea to try another browser to go to the same web page again. If the issue is resolved then you need to re install your browser to fix the error permanently, but if you are still facing the 502 Bad Gateway Error afterward it is not a browser related issue.
FIX 3: Clear Browser’s Cache
- Open Google Chrome and media Cntrl + H to start background.
- Then click Clear browsing data from the left panel.
- Make sure the “beginning of period” is selected under Obliterate the next items from.
- Also, check mark the next:
- Browsing history
- Download background
- Cookies and other site and plug-in data
- Cached pictures and files
- Autofill form data
- Click Clear browsing info and wait patiently for it to complete.
- Close your browser and then restart your PC.
Method 4: Start your Browser in Safe Mode
Windows Safe Mode is not the same thing do not confuse with it and don’t safely start your Windows.
- Create a shortcut of Chrome icon on the desktop and right-click then choose properties.
- Pick the Target field and type “–incognito” at the end of the command.
- Just click Apply followed by OK and then try to start your Browser with this shortcut.
- Now try to stop by the site and see if you are in a position to fix 502 Bad Gateway Error.
FIX 5: Customize Unnecessary Extensions
If you are in a position to repair your problem via above method, then you want to disable unnecessary extensions to resolve the problem permanently.
- Open Chrome and then navigate to settings.
- Next, select Extension from the left-hand side menu.
- Be certain to disable and delete all of the unnecessary Extensions.
- Restart your Browser as well as the mistake may have gone away.
FIX 6: Disable Proxy
- Press Windows Key + R then sort “inetcpl.cpl” and hit enter to start Internet Properties.
- Then Visit Connections tab and select LAN settings.
- Uncheck Use a Proxy Server for your LAN and also make sure “Automatically detect settings” is checked.
- Click Ok then Apply and reboot your PC.
FIX 7: Change DNS Settings
- Open Control Panel and click on Network and Internet.
- Next, click on Network and Sharing Center then click on Change adapter configurations.
- Select your Wi-Fi then double click on it and select Properties.
- Now select Internet Protocol Version 4 (TCP/IPv4) and click Properties.
- Check mark “Use the following DNS server addresses” and type the following:
Preferred DNS server: 126.96.36.199
Alternate DNS server: 188.8.131.52
- Close everything, and you may be able to Fix 502 Bad Gateway Error.
FIX 8: Flush DNS and Reset TCP/IP
1.Right-click on Windows Button and select “Command Prompt(Admin). “
- Now type the following command and press Enter after each one:
(a) ipconfig /release
(b) ipconfig /flushdns
(c) ipconfig /renew
- Again open Admin Command Prompt and type the following and hit enter after each one:
- ipconfig /flushdns
- nbtstat –r
- netsh int ip reset
- netsh winsock reset
- Reboot to use changes. Flushing DNS seems to Repair 502 Bad Gateway Error.
That is it you have successfully mend 502 Bad Gateway Error, but in case you still have any queries regarding this article, then please feel free to ask them in the comment’s section.