1. What does
502 Bad Gateway mean?
You can imagine the following:
A 502 Bad Gateway indicates that the edge server (server acting as a proxy) was not able to get a valid or any response from the origin server (also called upstream server).
The cause of the error:
Bad Gateway errors are often caused by issues between online servers that you have no control over. However, sometimes, there is no real issue but your browser thinks there’s one thanks to a problem with your browser, an issue with your home networking equipment, or some other in-your-control reason.
2. How to fix error 502 bad gateway on Mac
* Removing Cached DNS on the machine helps to fix the 502 error
* Disabling CDN content delivery network fixes Error 502
Incorrect CDN configuration can also lead to 502 bad gateway error. You just need to pause the CDN and reload the website to see if the error is fixed.
* How to resolve 502 errors as a visitor:
If you are a website visitor and have a 502 Bad Gateway error then there are also a few things you can try to resolve. While the main problem is almost always the web developer to blame, visitors can try the following:
– Perform a refresh in your browser. On a Mac, this is done by pressing Cmd + Shift + R.
– Clear browser cache and delete cookies. Your browser may be holding certain files that were saved after you visited the 502 error website.
Restart your computer / network device
– Change your DNS servers. If you’ve never changed them before, you may still have default servers assigned to you by your ISP, try using open DNS servers, such as Google’s Public DNS.