What Is a 502 Bad Gateway Error?

Chyelle Dvorak
Feb 23, 2022
Icon Time To Read3 min read

A 502 Bad Gateway error happens when an edge server isn’t able to receive a response from the origin server (the server that has the information you want). This sounds a lot more complicated than it actually is.

Whenever you access a website, multiple servers that talk to each other back and forth. A 502 Bad Gateway error means there was a problem with the communication with one of the servers. Usually because a server is down.

As soon as these two servers have problems communicating, you’ll see the 502 Bad Gateway error. If you’re curious what you can do to fix or prevent this error and more about why you see it in the first place, we’ve got some answers.

reviews.org next zip logo
Experiencing errors on the reg? Switching internet plans might help. Enter your zip code below to see what's available near you.

Why am I seeing a 502 Bad Gateway error?

It’s true that you can run into the 502 Bad Gateway error on any browser and on any computer. It happens when there’s a communication error between servers or the server your computer is trying to reach just isn’t available.

There’s more than one reason you’re seeing a 502 Bad Gateway error. Most likely, it’s because the origin server your computer is communicating with is down completely. If this is the case, then your computer is unable to access information from this server. It could also mean the server is down temporarily.

Another reason could be that there’s a faulty firewall. Think of your firewall as a security system protecting your computer from harmful outsiders such as viruses, hackers, malware, and other dangers. Sometimes a faulty or overprotective firewall can make this error appear even when you’re accessing a site that’s safe.

It’s also possible that the domain name servers (that translate domain names into IP addresses) aren’t working. If this happens, you’ll receive the 502 Bad Gateway error and there’s really nothing you can do in this case.

How do I fix a 502 Bad Gateway error?

Here are some basic ways you can try fixing a 502 Bad Gateway error.

Reload the web page. Sometimes servers are having a hard time communicating and there’s a glitch somewhere. You can easily check if it was just a fluke issue by reloading the page. Make sure you wait at least a couple minutes after you see the error—sometimes there’s just a temporary problem with the origin server.

Clear your browser cache and cookies. Sometimes your browser can collect cookies and cache from websites you visit over time. When this happens, your computer can show errors and have problems connecting to servers. Clearing your cache will help you start fresh.

Check for server issues or connectivity issues. Many websites require multiple servers or even use third-party web hosts. If a website is having this error, it could be due to a connectivity issue. The best thing you can do in this case is to wait for the server to finish solving the problem and try accessing the website again at a different time.1

Figure out if there’s a DNS issue. As we talked about earlier, a DNS (domain name system) problem happens when the domain doesn’t resolve to the correct IP address. If you think this might be the problem, you can try what’s called “flushing” your DNS cache. It’s a lot like clearing your cache and cookies but more in depth.

Temporarily disable your firewall. Remember that a firewall is what protects your computer from viruses and malware. Sometimes your firewall is overreacting to a site that’s actually safe. If you use a third-party firewall, try temporarily disabling it to see if that solves the 502 Bad Gateway error.2 If the error goes away, you’ll know your firewall just didn’t like the website you were trying to access.

Now that you know, here are your next steps.
reviews.org next zip logo
Time for a new internet provider? Find one near you.
reviews.org best of logo

Keep your internet access and browsing private.

Additional reading:


1. Clifford Chi, “A Simple Explanation of a 502 Bad Gateway Error & How to Resolve It,” June 18, 2019. Accessed November 6, 2020. 2. Brain Jackson, “How to Fix a 502 Bad Gateway Error on Your WordPress Site,” November 1, 2020. Accessed November 6, 2020.

Chyelle Dvorak
Written by
Chyelle Dvorak
Chyelle works as a freelance writer for The Daily Beast and edited articles for Forbes, Inc.com, Fox News and other review sites. Chyelle tests, writes, and researches products and services related to internet consumption. She found her passion for public speaking and writing in her childhood when she won the Voice of Democracy speech and essay competition. Chyelle has a degree in International Relations from Crown College, Minnesota. Outside of work, Chyelle loves to spend time reading, kayaking, and running.

Related Articles

Two people taking a selfie together in a park
Good2Go Mobile Plans Review
Looking for a stripped-down phone plan that won’t break the bank? Good2Go may not have...
A woman with curly, dark hair and a yellow shirt looks at her phone and smiles
FreeUp Mobile Review
Are you looking for a basic cell phone plan that doesn’t take half your paycheck?...
Boost Mobile Review - Students
Best Internet Plans for Students
We’ve done the research and come up with the four best internet plans for students,...
A mom, dad, and two children sit on a couch and use a laptop together
XTREAM Powered by Mediacom Internet Plans and Pricing Review
XTREAM powered by Mediacom offers solid data speeds and cheap pricing for new customers, but...