February 9, 2015
The 502 Bad Gateway response can occur due to one of two reasons:
- Change of the Origin IP:
If you change hosts, move to a dedicated IP address, start using a Load Balancer, start using CloudFlare, or anything that would cause your origin server’s IP address to change, the CDN will stop functioning and you will encounter a 502 Bad Gateway Error. In this case, you need to update the Origin IP in the Pull Zone configuration to match the new IP.
- Firewall blocking our servers:
As a part of a DDoS mitigation process, or as a result of some strict firewall rules, our servers can be blocked from accessing the origin web server. In this case, you just need to whitelist our subnets in your firewall rules. Also, worth mentioning is that some security plugins (for the CMS you use – if you use any) for DDoS mitigation may act the same as firewall is blocking us.
What To Do When You Get 502 Error
- The first thing to do when you get the 502 error is to check your origin IP in the zone management, click on Settings and make sure the IP address is correct. Should it be found incorrect, you need to update the Origin IP in the Pull Zone configuration to match the new IP, purge your zone cache, and try again. This should fix the problem.
- If the IP address is correct, please check your firewall rules and make sure you whitelist our subnets.
- If the problem persists, please send an email to email@example.com and our team will work to fix the issue.