The 502 Bad Gateway Error means that that our network is unable to communicate with your server. This tutorial will show you how to troubleshoot that unwanted response.

The 502 Bad Gateway response can occur due to one of two reasons:

  1. 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.

  2. 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

  1. 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.
  2. If the IP address is correct, please check your firewall rules and make sure you whitelist our subnets.
  3. If the problem persists, please send an email to and our team will work to fix the issue.