The “502 Bad Gateway” error happens since the server, acting as a proxy or gateway, attempted to access the main server to fulfill the request it got and has received no or invalid response. Sometimes, incomplete or empty headers caused by server side issues or broken connections can cause the error when accessed through a proxy or gateway. Even certain apps that block pop up ads works via reverse proxy.
You may know how to block pop up ads on your web browser, though the “Bad Gateway” error can be annoying. Depending on the website or browser, the same error page can be shown differently with the 502 being the only constant. Sometimes, it can be shown as just 502 or Server Error as displayed on Google.
You have zero control over these errors since they are server side related. However, at times even your web browser can be tricked into showing the error so there are some steps to resolve it. Prior to starting with these troubleshooting steps for 502 Bad Gateway, make it a point to create a system restore point just in case anything goes wrong.
Reload the Error Page
Wait for a few minutes and try reloading the web page, in which you encountered the Bad Gateway. Press Ctrl and F5 keys at the same time, with the browser tab open, as it bypasses the browser cache, and double-check in case the problem is fixed. In case this step did not help, then close all activities and reopen the browser. Proceed to the next step only if required.
Try a Different Browser
Try opening the same site from a different browser. In case you are running into the same error page, then the problem may not be browser related. However, if you are seeing the error then it has got to do with your browser. It can be one of the Chrome browser issues also.
Clear the Browser Cache
If Google Chrome is your browser, clear its cache. For that, follow the steps mentioned below.
- Open the browser and press Ctrl, Shift, and Delete keys simultaneously to open Clear browsing data.
- Switch to the Advanced tab in that and select the first six checkboxes, including Passwords and Autofill form data, and click on Clear browsing data
- Then, exit the browser and reboot the computer.
Disable Unwanted Extensions
You can quickly access the Chrome extensions page and decide whether deletion is required. After all, if an extension is unwanted you might as well delete it from Google Chrome.
- Open Chrome browser, type chrome://extensions/ on its address bar and press Enter.
- Make it a point to Disable as well as Remove unnecessary extensions. To Disable an extension you have to click on the toggle switch next to it. To Remove an extension click on the same button next to it.
- Exit and reopen the browser and see to it if the error page has gone away.
- Press Windows and R keys simultaneously to launch Run dialog box.
- In the dialog box, type inetcpl.cpl and click OK to launch Internet Properties.
- Then, switch to Connections tab and click on LAN Settings
- Deselect the checkbox Use a Proxy Server for your LAN, and ensure that the Automatically detect settings checkbox is selected.
- Click on OK and then Apply buttons and restart your computer.
Change the DNS Settings
- Click Start button, search for Network and Sharing Center and open it from the search results.
- Click on Change adapter settings link from the left pane.
- Choose Wi-Fi icon and double-click on it.
- Then under Networking tab, select the checkbox Internet Protocol Version 4 (TCP/IPv4). Then, click on Properties
- Under the checkbox Use the following DNS server address, assign 8.8.8 at the preferred one and 220.127.116.11 as the alternate one.
- Then, exit everything and see to it if the issue persists.
Flush DNS as well as Reset TCP/IP
- Open the Command Prompt with admin privileges. Then, key in the following commands and press Enter key after each command.
- ipconfig /release
- ipconfig /flushdns
- ipconfig /renew
- Open the Command Prompt again, and enter the following commands too.
- ipconfig /flushdns
- nbtstat –r
- netsh int ip reset
- netsh winsock reset
- Restart the system to apply the changes.
This should fix the Bad Gateway error you were facing, but in case the issue persists, get in touch with our browser support professionals through the toll-free number for an advanced solution.