Table of Contents
Sometimes browsing the internet may not be as smooth as we might desire. There are times when we are not able to access a webpage and all that we see is an error code. 502 Bad Gateway is an error that troubles many users. In this blog, we’ll discuss this error and try to fix it.
What is the 502 Bad Gateway Error?
502 Bad Gateway status code on a webpage is an error that occurs when one server receives an invalid response from another server. There can be many reasons why this error might take place. In this blog, we will discuss ways on how to fix Bad Gateway 502 status code.
How is 502 Bad Gateway Caused?
Let’s have a quick look at some probable causes of this error –
- Web server is taking a lot of time to return a request
- Although not very common, DDoS attacks can also trigger 502 Bad Gateway
- Website’s receiving way more traffic than it is supposed to
- Your request is blocked by firewall
- Problem with the router, modem, or other networking equipment
- Your ISP has blocked the website
How To Fix 502 Bad Gateway?
Start by testing the connection on some other device. You could use another computer or smartphone that is advisably connected to a different network. Also, try opening the website on some other browser as well.
1. Refresh Your Page
One of the ways to get rid of https 502 Bad Gateway is to simply reload your webpage. This solution can be helpful if your server or host is overloaded. You can right-click and click on the reload option or press F5 or Ctrl + F5.
2. Check If Your Website Is Down or There Is Some Problem At Your End
This step would take a few seconds to a minute but it will tell you whether there is some problem at your end or if the website is genuinely down. Copy your website’s URL and paste it into downforeveryoneorjustme.com. If there is some error at your end, the website would return a comment saying that the website is down for you.
3. Clear Browser Cache
One of the reasons why this error occurs is because your browser has cached corrupt or outdated files. So, another simple way to resolve the “request failed with status code 502” is to clear the browser cache. In a few simple steps, you can clear cache from browsers such as Safari, Chrome, and Firefox.
Also Read: Clear Cache on Safari & Chrome
4. Restart Your Computer
Sometimes temporary bugs occur in computer and networking equipment. As such, restarting your PC and router can help fix the issue. Shut down your PC and unplug your Wi-Fi, then wait for a moment and switch them on, and check if you are still getting the 502 status code or not.
5. Flush Local DNS Cache
DNS issues such as unresponsive DNS servers, incorrect IP addresses, or changing your hosting service can too lead to errors and 502 Bad Gateway is one of them. If you have recently changed your hosting service, you should at least give 24 hours for the changes to take place. In case the error still appears, flushing the DNS cache can be an option. Here is how you can flush the DNS cache on Windows 10.
6. Use A VPN
You might wonder how a VPN can help you with this error. A VPN can help you in rerouting your connection before you can access the website. This can especially be helpful if your ISP has blocked access to the website. Secondly, several VPNs make it easy to flush DNS that can further help you resolve errors like the 502 Bad Gateway error.
Systweak VPNs is one of the best VPNs that can easily help you flush DNS and reroute connections. Want to check it inside out? How about a comprehensive review?
What is Systweak VPN?
Systweak VPN is one of the best VPNs for Windows 10 which has over 4500 servers spread in over 53 countries across 200+ locations and has a simplistic, and easy-to-use interface. It is compatible with Windows 10,8.1,8 and 7 and offers features such as –
- Strict no-logs policy
- AES-256 military-grade encryption
- You can choose between IKEv2 and OpenVPN, both of which are strong VPN protocols
- Dedicated kill switch
How To Quickly Flush DNS With The Help of Systweak VPN?
Flushing DNS with Systweak VPN is a matter of a few simple steps or clicks if you will:
- Install Systweak VPN
- On your taskbar, locate the system tray (on the right-hand side, an upward arrow) and click on it
- Locate the Systweak VPN icon, right-click on it and then click on Flush DNS Cache
How Much Would It Cost Me?
You can get a Systweak VPN for US$ 9.95 per month or US$ 71.40
Click Here to Download Systweak VPN
7. Check Themes and Plugins
Sometimes poorly coded and faulty themes and plugins conflict with each other. As a result, your server will terminate every query and script on your website because of which 502 Bad Gateway errors may occur. You can try disabling all plugins and reactivating them one by one. This way, you will also be able to catch hold of the culprit plugin or theme.
In case you are unable to access your content management system’s (CMS) dashboard, you can try disabling your plugin and themes from the FTP program or hosting panel.
Common 502 Status Code Variants
- 502 Bad Gateway
- Request Failed With Status Code 502
- Temporary Error (502)
- 502 Bad Gateway NGINX
- 502 Service Temporarily Overloaded
- 502 Server Error: The server encountered a temporary error and could not complete your request
- HTTP 502
- 502 Proxy Error
- That’s an error
- Error 502
- Bad Gateway: The proxy server received an invalid response from an upstream server
- HTTP Error 502 – Bad Gateway
In most cases, the 502 Bad Gateway error is not a client-side error rather a server-side error. Yet, there are a handful of things you can do to resolve this issue. If you have another trick up your sleeves to get over this issue, do mention it, in the comments section below. For more such content keep reading Tweak Library. You can also find us on Facebook, youTube, Twitter, Instagram, Pinterest, Flipboard, and Tumblr.