The Error 502 Bad Gateway is seen when the browser does not get a response from the server. Mostly this error is seen when there issue on the server-side. Generally, when you enter an URL and press Enter, an HTTP request is made to the proxy server. If the proxy server does not contain the requested URL details, it requests the information from the original server. If the original server does not respond to the proxy(maybe because it is overloaded, or faulty), the proxy server notifies that there is an error. Refer to the below screenshot.
The complete error message may look like one of them as shown below –
- Error 502 Bad Gateway Nginx Code
- Error 502 Bad Gateway
- 502 Service Temporarily Overloaded
- 502 Proxy Error
- 502. That’s an error. The server encountered a temporary error and could not complete your request.
At times, this could be an error from your end as well. The network device might be down, or the third-part plugins may be interfering.
In any case, if you have encountered this error, don’t worry. Try out the general fixes before trying out the specific ones.
- Restart your system.
- Restart your Router.
If you are still seeing the error, go ahead and try the fixes listed below.
Fix 1: Refresh the webpage
1. Click on the Refresh button as shown below.
Alternatively, hold the keys Ctrl+Shift+R together to reload the webpage.
Fix 2: Open the webpage in Incognito Mode
1. Open Chrome.
2. Click on the menu option. It is in the top-right corner of the window.
3. Select the New Incognito Window.
Alternatively, hold the keys Ctrl+Shift+N to open the browser in incognito mode.
3. Enter the URL and check.
Fix 3: Delete the cookies
1. Open Chrome and enter the below location and press Enter.
2. Now, press the Remove All button.
3. In the appearing dialog, click on Clear All.
4. Now, enter the URL and try again.
Fix 4: Use a different browser.
Try using a different browser (Firefox, Chrome, etc.) to open the same link.
If you notice the same error again, it might either be an issue with the website or an issue with your network device.
Fix 5: Use Open DNS Servers
1. Open the Run Dialog with the keys Windows+R.
2. Type the command ncpa.cpl, and press Enter.
3. The Network Connections window opens. Double-click on the on your Network Adapter in use.
4. The Wireless Network Connection Properties window opens.
5. Under the section This connection uses the following items, double-click on Internet Protocol Version 4(TCP/IPv4).
6. The Internet Protocol Version 4(TCP/IPv4) Properties window opens. Tick the option Use the following DNS server addresses.
7. Set the Preferred DNS Server to 22.214.171.124
8. Set the Alternate DNS server to 126.96.36.199
9. Click on the Ok button.
If you are still seeing the error, it might be because of the issue on the server-side.
We hope this article has been informative. Thank you for Reading.
Kindly comment and let us know the fix that helped you solve the issue. Also, comment and let us know if you are facing any issues. We will be glad to help.