What Is a 502 Bad Gateway Error?

Chyelle Dvorak
Feb 23, 2022
bullet3 min read

We may earn money when you click our links.

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.

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.
Time for a new internet provider? Find one near you.

Keep your internet access and browsing private.

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

How To Watch All 2023–2024 NFL Playoff Games
Find out how you can watch the NFL playoff games with and without cable for...
Woman sitting on bed eating popcorn and drinking wine while laughing at movie on TV
Hulu + Live TV vs. YouTube TV Review 2023
If you’re unsure which live TV streaming service is the best for you, check out...
Tello vs. Xfinity Mobile
Tello vs. Xfinity Mobile
Xfinity offers awesome family plan discounts and Tello offers cheap individual data plans.
How to Get a Free Phone from the US Government
You can get a free cell phone and a cheap plan to go with it...