What does 502 bad gateway mean? How to fix it?
Every time we enter a URL in our web browser, or search in a search engine (Google, Yahoo, Bing, etc.), our browser sends a request to the Internet, and expects a response to that request. If a request is not received, this 502 Bad Gateway Error appears.
You may encounter this HTTP with one of the following descriptions:
The reasons behind this error include:
The solutions listed below will show you how to fix this gateway error - read them carefully.
In order for us to enjoy the benefits of our smartphones, or tablets, the operating system needs to execute many instructions in the background, even for a simple swiping up or down. Aside from the processes we are aware of, our smartphones run many processes in the background we aren't aware of. It is possible that a background process running on your mobile device is the reason behind error 502. In this case, the best 502 Bad Gateway fix is restarting the mobile device.
Restart your device by turning it off via the power button, and then turning it back on.
The router is the point through which Internet connection is spread in our homes, wirelessly, or via wire (Ethernet cable). Sometimes, the router can stop sharing the connection. Maybe it simply blocked the connection, or the Internet went down for a couple of minutes and the router didn't reconnect to it. An issue with the router and/or modem, can lead to HTTP error 502, too. Restarting the router, and the modem, if you use one, can help you fix this error and regain Internet access.
Unplug the router, and the modem (if you use one) from the power cord, and then plug them back in after a couple of minutes.
It is possible that a malicious software has infected your computer. When a computer is invaded by viruses, files get corrupt, or damaged, and error messages like 502 Bad Gateway error arise. Scan your computer for malicious software, and if viruses are detected, removing them from your computer should fix the issue. Having an antivirus software installed doesn't mean your computer will be virus-proof. New viruses are released frequently, and your antivirus software may sometimes be slow to react, no matter how fast they are. Adhere to the following, to keep your computer as secure as possible:
Feel free to check out the virus removal and protection guide, where you can learn useful tips on how to remove viruses, and protect your computer against them.
Issues with the Internet Service Provider (ISP), and the website's hosting service occur regularly. It is mostly a minor outage (major outages rarely happen nowadays). Maybe there was a minor interruption from your ISP, or an issue with the website's hosting service that resulted in 502 Bad Gateway error. Such issues are resolved fast, and refreshing the website again, using the refresh button will be enough, to fix this error.
A quick way to fix the possible reasons for this error is to enable and disable the airplane mode. Enabling and disabling the Airplane mode is a soft restart of the device's network components, among which are the Wi-Fi, and Bluetooth, which may have been taken over by a stuck process, or a program/app.
Regardless of the device you are using, the airplane mode is activated and deactivated through an airplane button, easily.
Note: For more detailed instructions how to turn off and back on the airplane mode, check out the how to enable/disable the Airplane mode guide.
If a website opens correctly in one web browser, but not in another, then use the browser where websites open correctly, because the one where the website won't open may have issues accessing the website you are trying to visit. Feel free to choose the one you like most, out of the many web browsers available online, which you can install and use.
In order for you to connect to the Internet and go online, your DNS settings need to be correctly set. Usually they are configured by the ISP provider, but every user has the opportunity to alter them, and set manual DNS settings. It is possible that wrong or badly configured DNS settings are causing the 502 Bad Gateway error message.
To learn how to check out and/or change the DNS settings, check out the how to change the DNS settings guide.
It is possible that a task executed by your operating system interrupted a process performed by your web browser, resulting in this error. Or, maybe a browser extension became unresponsive. If this is the case, to fix this error you can just restart the web browser, by closing it and reopening it after a minute or two.
Note: Depending on the web browser, you may need to shut it down completely. To learn how, feel free to check the how to close (quit) programs/applications guide.
Turning off your computer and then turning it back on is one of the most effective ways to fix this Bad Gateway error. You will restart the operating system, with all the processes running on it, as well as all the programs, some of which may have led to this error in the first place.
If you use a desktop computer, you can just unplug it from the power cord and plug it in after a couple of minutes, whereas if you use a laptop and its battery can be removed, remove the battery and reinsert it after a minute.
Rather than reinventing the wheel when we need one, we just buy one from the store. Analogously, when opening an app, a program, or a website, rather than reentering the login details, and setting up our preferences all over again, they are just there, waiting for us. The cookies and cached data help us save time and effort. Unfortunately, over time, cookies and cached data can become corrupt, because of website changes, or program/app changes. Corrupt cache and data, on the other hand do more harm than good. Perhaps a bad cookie or cache file is the reason behind the 502 Bad Gateway error message. In order to fix this error message, you need to clear the cache files, the cookies and other unnecessary data.
If you feel unsure how to clear the browser's cache (and cookies), feel free to check the how to clear the browser cache guide, and how to delete browser cookies guide and find the easiest ways to do that. They cover the majority of web browsers available.
The purpose of drivers is to interpret the instructions from the operating system, and instruct the network module (Wi-Fi or Ethernet) what to do, in order for a specific action to be carried out. As time goes by Windows, the operating system, and other programs receive updates, and it's possible that with the update the way how instructions are being given was changed. In order for the driver to learn how to read these instructions, it needs to be updated, too. Often times, however, users overlook the drivers, and their importance. Outdated network driver can also be the reason for the 502 Bad Gateway error message. Updating your computer's drivers on time is a must, so as to prevent errors outdated drivers can cause.
One way to update the driver is via the Device Manager, by following the steps below:
For more ways on how to update and install drivers, check out the how to download and install drivers guide.
Maybe the website(s) you are trying to visit is (are) on the black list of the system firewall or the antivirus, for some reason. If you can't access particular websites, but can access other websites, open the firewall or antivirus settings and check if you can see that website's URL address on a list of blocked websites. If you can, removing it from the list is enough to fix the issue.
Note: Maybe the website was blocked for a reason, so before unblocking it, make sure to do a mini research on the internet and check what other people think.
You can also disable the Windows Firewall temporarily, as a test to see if it's the reason behind this HTTP error.
To disable the Windows Firewall:
To enable the Windows Firewall:
Maybe the website(s) you are trying to visit is (are) on the black list of the system's firewall, or the antivirus, for a (usually good) reason. If you can't access particular websites, but can access other websites, open the firewall or antivirus settings and check if you can see that website's URL address on a list of blocked websites. If you can, removing it from the list will fix the issue.
Note: Maybe the website was blocked for a reason, so before unblocking it, make sure to do a mini research on the Internet and check what other people think.
The IP is like our online ID, but the DNS is our movie ticket. You won't be able to browse the Internet if the DNS is wrong. HTTP errors appear due to DNS errors, too. Luckily, it can be resolved easily, with a set of commands. By entering the commands below, you will flush and renew the DNS and the IP address and possibly resolve the error. Follow the steps below, in order to access the command prompt (CMD) and enter the commands:
Maybe the ISP or the operator (if you use mobile data) itself are the reason behind the 502 Bad Gateway error message. There are cases when people can't access websites just because those websites are blocked by the ISP or the operator itself, for various reasons, or maybe there is a malfunction in the network of the provider.
To be 100% sure, contact the ISP/Operator support team, tell them the URL address of the website you can't visit, and they will instruct you on the next steps you need to take to have this issue resolved, or they will resolve it instead.
If this error appears only when you want to visit a specific website, it's possible that the website itself is causing this error. Maybe they have issues with the server where their website is hosted. As this can only be resolved by someone who has access to the website, i.e. a webmaster, contact the website's owners and let them know of this issue.
Even though their purpose is to make user experience faster, when they get corrupt, bad temp and system files can cause many headaches to a computer owner, including errors like 502 Bad Gateway. Windows's utility Disk Cleanup can delete all the unnecessary files, and temp files among the rest. To find the Disk Cleanup and run it, feel free to follow the steps below:
Under Files to delete, select the file types to get rid of (by ticking the checkboxes next to them) and click on OK.
*Repeat this for each drive separately ( "C:" "D:" "E:" and etc.).
If you don’t receive the email in the next 2 minutes please check your junk folder, and add [email protected] to your safe sender list.