502 Bad Gateway Error.

What is 502 Bad Gateway Error?

A 502 Bad Gateway Error occurs when you try to visit a web page, but one web server gets an invalid response from another web server.

502 Bad Gateway Error

Causes of 502 Bad Gateway Error.

There are various reasons for this to happen such as:

  • One/all of your upstream servers are down or can’t be accessed
  • Your server is simply overloaded
  • You have buggy PHP scripts such as faulty WordPress plugins or themes
  • Browser cache is acting up
  • Problems with your router or networking equipment
  • Your content delivery network (CDN) is acting up
  • You have domain name system (DNS) issues

How to fix this error?

You can optimize your website. Try removing unnecessary files, plugins and themes. Check for PHP errors sometimes they may be causing load on your website.

Also, try to temporarily disable the CDN like Cloudflare and clear your browser’s cache.


Still have questions? Check our forum!