Browsing the internet doesn’t always go smoothly, you might encounter ads, pop-ups, viruses, malware, and even errors. In this post, we’ll walk you through how you can fix the 502 Bad Gateway error that you might encounter in browsing the internet. This kind of error suggests the server which is the one that’s acting as a gateway to facilitate in taking your request to the server and bring some response back has received an invalid response or even no response at all. It could be that the connection is broken or that there is an issue on the server-side that returns an invalid response. Even though the 502 Bad Gateway error is a server-related error, there are still a few things you can try that might help resolve it, if tapping the Ctrl + F5 keys does not resolve the problem.
Keep in mind that it doesn’t matter what website you open as this error can appear on any website. To resolve the problem, you need to follow the options prepared below.
Option 1 – Check the network cable connections and restart your router
As with other connection problems, this is the most basic thing to do before you try other troubleshooting options because the root cause of the problem might be as simple as a cable not connected properly or a router that just needs to be restarted. Thus, checking the network cable connection to see if there is anything out of order can help as well as restarting your router.
Option 2 – Reset Winsock, TCP/IP & Flush DNS
Resetting Winsock, TCP/IP, and flushing DNS might help you resolve the issue. To do so, follow these steps:
- Right-click on the Start button and click on Command Prompt (administrator) so you can pull up an elevated Command Prompt.
- After that, execute each one of the commands listed below. And after you typed in one after the other, you have to hit Enter.
- netsh winsock reset – type in this command to reset Winsock
- netsh int ip reset resettcpip.txt – type in this command to reset TCP/IP
- ipconfig /flushdns– type in this command to flush the DNS cache
- Next, restart your PC and check if the problem’s fixed.
Option 3 – Change the DNS
Changing the DNS server for your network can also help you fix the 502 Bad Gateway error. You can use a public DNS like the Google Public DNS, Open DNS, Yandex DNS, Comodo Secure DNS, and many more. All you have to do is to override the default DNS settings on your PC so that you can specify which DNS server is used as well as which IP address should be used for a specific domain.
Option 4 – Try updating the Network Adapter Driver
Follow the steps below to update your Network Adapter Driver:
- Tap the Win + R keys to launch the Run window and then type in the “devmgmt.msc” command and hit Enter to open the Device Manager window.
- From there, expand the list of all the network drives and update each one of them.
Note: If updating the network drivers didn’t help in fixing the problem, you can also try to uninstall the very same drivers and restart your Windows 10 PC. After that, the system itself will reinstall the drivers you just uninstalled. Alternatively, you can also download and install the drivers from the manufacturer’s website directly.
Option 5 – Try a Network Reset
When all else fails, you might have to consider resetting your entire network settings. Simply follow the steps below to do so.
- Click on the Start button and then click on the gear-like icon for Settings to open it.
- Next, select Network and Internet.
- Then scroll down and look for “Network Reset” – click on it and then click on the Reset now button.