Http error 502

http error 502

An HTTP status code (Bad Gateway) indicates that CloudFront wasn't able to serve the requested object because it couldn't connect to the origin server. A Bad Gateway indicates that the edge server (server acting as a proxy) could not get a valid or any response from. A Bad Gateway Error means that the web server you've connected to is acting as a proxy for relaying information from another server, but it.

Http error 502 - think, that

Support

Updated on April 29,

If you browse the internet long enough, you'll run into a error code. This is especially true if you frequently visit websites known to be unreliable. While the error can be frustrating, the good news is that it's usually easy to fix.

In this article, we'll take a look at what a error code is and how you can go about solving it on your own.

What does mean?

A indicates that the edge server (server acting as a proxy) could not get a valid or any response from the origin server (also called the upstream server). This can occur for a few reasons, which we'll discuss below. If one of KeyCDN's edge servers receives a Bad Gateway response from your origin server, KeyCDN will return a page.

To better understand how KeyCDN handles certain error codes, check out our CDN Error Codes page.

Usually, a error code is accompanied by a message letting you know that a "bad gateway" exists. In other words, something went wrong while the server was trying to relay information to another server (usually an upstream server). The most common cause of this issue is an incorrect or outdated DNS record.

What are the reasons for responses?

Three main culprits cause responses. These include:

  1. Domain name not resolvable: The domain name is not resolving to the correct IP or it does not resolve to any IP. It is important to note that DNS changes could take same time until they are global fully propagated and active. This is dependent on the TTL, or time to live, defined per record.
  2. Origin server down: The server is not reachable, either because it is down or there is no connectivity to the server given.
  3. Firewall blocks request: A firewall blocks the communication between the edge servers and the origin server. This can also be caused by security plugins of your CMS. Some DDoS protection and mitigation systems might are too overreactive and start blocking requests from our content delivery servers.

How you might see a error

Based on your web server, you might see a different error.

Every time, it means the same thing. The only different component is their naming conventions. Here are a few examples of what you might see:

  • Bad Gateway
  • HTTP Error - Bad Gateway
  • Service Temporarily Overloaded
  • Error
  • Proxy Error
  • HTTP
  • Bad Gateway NGINX

You can see in greater detail what the error specifically entails by going to your web server's error log file. All error and diagnostic information is stored in this file making it a valuable resource to check when you need more details about a particular error. You can locate this file in Apache by going to and in Nginx by going to .

You can see what the error specifically entails by going to your web server's error log file in greater detail. All error and diagnostic information are stored in this file, making it a valuable resource to check when you need more details about a particular error. You can locate this file in Apache by going to and in Nginx by going to .

How to solve errors as a web developer

As a web developer or owner of the website, there are a few reasons why you may be experiencing a error on your origin server. Therefore, you may need to try various methods to resolve the issue. Reference the list of suggestions below:

  • Check if your FQDN (fully qualified domain name) is resolving correctly by using our DNS test tool.
  • Verify if your server is reachable by using a ping test or traceroute.
  • Check your firewall logs if you are seeing unusual drops.
  • If you're a Cloudflare user, try disabling it as once you've reached a certain limit Cloudflare will return a error to your visitors.

How to solve errors as a visitor

If you're a website visitor and experience a error then there is also a few things you can try to resolve it. Although the primary issue will almost always be the responsibility of the web developer, visitors can try the following:

  • Perform a hard refresh in your browser. On Macs, this is done by pressing + + .
  • Clear your browser cache and delete cookies. Your browser may be holding on to certain files that were saved once you visited the website with a error.
  • Restart your computer/networking equipment
  • Change your DNS servers. If you've never changed them in the past you likely still have the default servers assigned to you by your ISP, try using open DNS servers such as Google's Public DNS.

Common solutions for Error Code

Usually, a error code is the result of a server error. A server error means that the server you are trying to access is unavailable or down. However, it is also possible on the client-side.

Here are some common ways to fix it in detail:

Reload the page

The first and easiest thing you can do is simply reload the page. A error code and a error code are both server-side errors. This means that there is something wrong with the server. The problem could be anything from the server being down to the server being too busy.

A reload will send a new request to the server. The server may be down, but it could also be that the original request timed out. A reload will often fix the problem.

Tools like DownForEveryoneOrJustMe are useful for seeing whether this is a server-side issue or an issue on your end.

Clear your browser's cache

It is also possible that your browser's cache is causing the problem. If you have recently visited the site, your browser may be trying to use an old version of the website. To clear your browser's cache, go to the settings in your browser and look for the option to clear your cache.

In Google Chrome, you can go to the three dots in the top right corner and click More tools. From there, click Clear browsing data.

In Mozilla Firefox, you can go to the three bars in the top right corner and click Options. From there, click Privacy & Security and scroll down to Cookies and Site Data. Click Clear Data.

In Microsoft Edge, you can click the three dots in the top right corner and click Settings. From there, click Choose what to clear under Clear browsing data.

In Safari, you can click the Safari menu and click Preferences. From there, click the Privacy tab and click Manage Website Data. Click Remove All.

Restart your computer and router

It is also possible that the problem is on your end. If you have recently installed new software or made changes to your computer, these could be causing the problem. Try restarting your computer and see if that fixes the problem.

If the problem is on your end, one of your browser's extensions is likely causing the problem. Try disabling all of your browser's extensions and see if that fixes the problem.

If the problem is still not fixed, you can try resetting your router. To do this, unplug your router from the power outlet and wait 30 seconds. After 30 seconds, plug it back in and wait for it to connect to the internet.

Change your DNS servers

If you are still having problems, you can try changing your DNS servers. If you have never changed your DNS servers before, you likely have the default ones assigned to you by your ISP. If your DNS server is not responding or your domain is not resolving the correct IP, it can result in a error.

However, you can try using public DNS servers such as Google's Public DNS.

To change your DNS servers in Windows, go to the Control Panel and click Network and Sharing Center. From there, click Change adapter settings and double-click your internet connection.

Click Properties,then click the Networking tab. From there, double-click Internet Protocol Version 4 (TCP/IPv4).

In the General tab, click Use the following DNS server addresses. Enter for the Preferred DNS server and for the Alternate DNS server.

Click OK to save your changes.

You can also change your DNS servers in your router's settings. The process will vary depending on your router, but you will likely be able to find the DNS settings in the Network or Internet section of the router's settings.

Once you have changed your DNS servers, try loading the website again.

Flush DNS cache

DNS caching can also cause errors. When you visit a website, your computer stores certain information about that site in its DNS cache. This can help your computer load the website faster the next time you visit it. However, if this information is outdated, it can result in a error.

To flush your DNS cache, open the command prompt and enter the following:

Windows:

Mac:

Linux:

Once you have flushed your DNS cache, try loading the website again.

Temporarily disable Your CDN or firewall

Most servers use a content delivery network (CDN) such as KeyCDN. While very helpful (and important), these services can sometimes cause errors. If you are using a CDN, try temporarily disabling it and see if that fixes the problem.

To disable your CDN in WordPress, go to the CDN tab in the Settings section of your WordPress dashboard and click the Disable CDN button. Click Save Changes.

In other CMSs, the process will be similar. Look for a CDN or Content Delivery Network settings page in your CMS's dashboard and follow the instructions.

Similarly, your firewall could also be the cause of errors. If you are using a firewall, try temporarily disabling it and see if that fixes the problem.

To do so, go to the Control Panel and click System and Security. From there, click Windows Firewall.

Click the Turn Windows Firewall on or off link in the left sidebar. If prompted for an administrator password or confirmation, enter the password or provide confirmation.

Click the Turn off Windows Firewall (not recommended) option for both private and public networks and click OK.

Summary

If you see errors, there are a few things you can do to try and fix the problem. Usually, this error code is an easy one to fix and requires one of the following:

  • Reload the page
  • Clear your browser's cache
  • Restarting your computer or router
  • Flushing your DNS cache
  • Temporarily disabling your CDN or firewall

If you are still having problems, you can try changing your DNS servers. If you have never changed your DNS servers before, you likely have your ISP's DNS servers configured. However, you can try using public DNS servers such as Google's Public DNS.

Worst case scenario, you will have to contact your ISP's customer support. They should be able to help you troubleshoot the problem and get you back online.

The Bad Gateway error usually happens when there are some network errors between computer and internet severs . This means that a server (not necessarily a web server) acting as a gateway or proxy and received an invalid response from an upstream (or origin) server. In most cases the problem is not with you computer or your internet connection , it's far more likely that it's the website's server instead.

How To Troubleshoot HTTP Error Bad Gateway

HTTP status code

In essence, if you see a Bad Gateway error, this is an HTTP status code . HTTP status codes are three-digit codes, and are grouped into five different classes. The class of a status code can be quickly identified by its first digit:

  1. 1xx: Informational
  2. 2xx: Success
  3. 3xx: Redirection
  4. 4xx: Client Error
  5. 5xx: Server Error

The 'Bad Gateway' error is coming from the server , and usually has nothing to do with your PC. It usually happens when you visit a website that uses a relay point, called a proxy server, that keeps data separate from the server hosting the site's main page. If the main server and proxy server don't properly connect due to incorrect Transmission Control Protocol data, your browser determines the proxy, or gateway, to be bad.

Error Messages

Different sites and services will often customize their error messages , both for the sake of them appearing unique, and also help tech-savvy users to better understand the cause of the error.

  1. Bad Gateway

  2. Proxy Error

  3. That's an error

  4. HTTP Error - Bad Gateway

  5. Service Temporarily Overloaded

  6. Bad Gateway: The proxy server received an invalid response from an upstream server

  7. Server Error: The server encountered a temporary error and could not complete your request

Cause of Bad Gateway Errors

The Bad Gateway Error is an indication that something has gone wrong within the server of your application, as opposed to the client side request. At its heart, the cause is simple, two online servers are having trouble communicating. Often, simply refreshing or reloading the page (Ctrl-F5) will work, but sometimes the problem can persist for days. There are 5 main problems that cause Bad Gateway responses. These include:

Server failure: The gateway receives a negative result if the target server has failed completely. This can occur due to a system crash .

Domain name not resolvable: The domain name is not resolving to the correct IP or it does not resolve to any IP. It is important to note that DNS changes could take same time until they are global fully propagated and active. This is dependant on the TTL, or time to live, defined per record.

Webserver overload: If a webserver reaches its limit, it can't answer any more requests , the gateway then delivers the status code Bad Gateway.

Firewall blocks request: Firewalls can cause errors on both sides of the communication (server and client) with the forwarding of requests.

Browser error: Browser extensions can also sometimes cause errors with the display of a website and generate a error .

How to Fix a Error

  1. Perform a hard-refresh in your browser. On Macs, this is done by pressing Cmd + Shift + R.

  2. This problem is due to poor IP communication between back-end computers, possibly including the Web server at the site you are trying to visit. Before analysing this problem, you should clear your browser cache completely.

  3. If you get this problem for only some of the Web sites you try to visit then it is likely to be a problem at those sites i.e. one of their pieces of equipment is failing/overloaded. Contact the people at those sites.

  4. If you are surfing the Web and see this problem for all Web sites you try to visit, then either 1) your ISP has a major equipment failure/overload or 2) there is something wrong with your internal Internet connection e.g. your firewall is not functioning correctly. In the first case, only your ISP can help you. In the second case, you need to fix whatever it is that is preventing you reaching the Internet.

  5. In some cases, this error caused by low computer hard disk space, you can go check the free space of your computer hard disk. If there is really not enough free space left, clean your computer hard disk well.

  6. Start your browser in Safe Mode. Running a browser in Safe Mode means to run it with default settings and without add-ons or extensions, including toolbars.

  7. If your web application is configured to listen on a socket, ensure that the socket exists in the correct location and that it has the proper permissions

  8. Finally, restart your computer/networking equipment. Some temporary issues with your computer and how it's connecting to your network could be causing errors, especially if you're seeing the error on more than one website. In these cases, a restart would help.



NEXTError :data:text/html,chromewebdata

You can get a bad gateway error when there's a problem with the server of the website you are trying to connect to.
error

In more technical terms, the “” in the error is an HTTP status code which indicates that one server received an invalid response from another server.

There are other categories of errors including:

  • – Not Implemented,
  • – Service Unavailable
  • – Gateway Timeout
  • – HTTP Version not supported
    And many more.

The causes of the bad gateway error include an overloaded server, an error in the code, and yet-to-be-propagated domain names. So the error is often caused by the server of a website and not by you as the user.

But sometimes, the browser might show this error due to past-due updates, ad-blockers, browser extensions and plugins, or even DNS server problems.

In this article, I will show you 4 ways you can fix the bad gateway error so you can access the internet again.

Fix 1: Refresh the Page

Many server errors are only temporary, not permanent, and bad gateway is no exception.

If you’re getting this error, the first thing you should do is refresh the page after a couple of minutes and see if the website loads up again.

To refresh Google Chrome, click on the refresh button in the top-right corner:
ss

Edge also provides the same refresh button in the same position:
ss

If refreshing fails to work, wait a couple of minutes and try again. If the error persists, then proceed to the other fixes in this article.

ADVERTISEMENT

Fix 2: Try to Access the Website on another Device

Your own device – whether it's a computer or phone – could be the reason you’re getting the bad gateway error. In addition, your internet connection source – router or modem – could be the culprit.

Since this could be the cause, try to access the website on another device or switch your internet connection source.

You can also reboot your devices – computer, mobile phone, router, and modem.

Fix 3: Switch to another Browser

Since the cause of the bad gateway error could be due to an outdated browser or ad blockers, you should consider changing to a different browser and see if the error persists.

For example, if you use the Windows operating system and you’re trying to access the website with Chrome and you're getting the bad gateway error, switch to Edge and vice versa. If you are on Mac and you’re getting the error on Chrome, then consider switching to Safari and vice versa.

If you have Mozilla Firefox installed on your computer, you can also switch to it too. You might get a different experience as it is not built on the same Chromium engine Edge and Google Chrome are built on.

If the website loads up in another browser, then you might need to update the initial browser, reinstall it, or check your extensions and ad blockers.

ADVERTISEMENT

Fix 4: Clear your Browser Cache

You might be getting the bad gateway error because your browser stored outdated information about the website you’re trying to visit. So, clearing your browser cache could fix the error.

To clear your Chrome browser cache, follow the steps below

Step 1: Click the 3 vertical dots on the top right corner:
ss

Step 2: Hover on More tools and select Clear browsing data:
ss

Step 3: Make sure you select "Cached images and files" as part of the data to clear, then click on the "Clear data" button:
ss

ADVERTISEMENT

To clear your Microsoft Edge cache, follow the steps below

Step 1: Click on the 3 horizontal dots on the top-right corner:
ss

Step 2: Select Settings:
ss

Step 3: Click on "Privacy, search, and services”.

Step 4: Under, “Clear browsing data”, click on the “Choose what to clear" button:
ss

Step 5: Make sure cached images and files are selected, then select “Clear now”:
ss

Fix 5: Flush your DNS Cache

DNS problems could be the reason you keep getting the bad gateway error while trying to visit a website. So flushing your DNS cache could be a solution.

ADVERTISEMENT

To flush your DNS cache on Windows 10, follow the steps below:

Step 1: Click on Start, type “cmd”, then select “Run as Administrator” on the right:
cmd-admin-1

Step 2: Type in “ipconfig /flushdns” and hit .
You should get a response that the DNS cache has been flushed, like the one below:
ss

This means all caches will be cleared and websites will be loaded freshly for you.

If you use Chrome, it has its own DNS cache

To flush Chrome’s DNS, type in the address bar and hit , then click “Clear host cache”:
ss

ADVERTISEMENT

If you use Edge, it has its own DNS cache too

To flush Edge’s DNS, type in the address bar and hit , then click “Clear host cache”:
ss

Conclusion

While it is unlikely for the error to come from the user-side (as it’s a server-related error), you can still try some fixes on your end as the user. That’s why I wrote this article to show you how you can fix the error from your end.

Thank you for reading.

If you read this far, tweet to the author to show them you care.

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40, people get jobs as developers. Get started

What is Bad Gateway Error &#; How to fix it?

The error Bad Gateway has been experienced by the majority, if not all, internet users. You usually have no idea what happened or why it did. However, you received an error and must now reload the page several times. If this has ever frustrated you, than this article is here to help. Here, we’ll take a closer look into the error Bad Gateway, what it is, and what to do once you encounter this error. Let’s kick things off by getting a better understanding of what the error Bad Gateway means.

What is Bad Gateway?

The error Bad Gateway is an HTTP status code indicating that something may have gone wrong with a website&#;s server communication. While doing a search online, the server receives your request then sends a response along with an HTTP header and status code. However, The Bad Gateway server error response code indicates that the server received an erroneous response from the upstream server while functioning as a gateway or proxy.

You won&#;t actually know the exact issue with the website because it is a generic error. When you receive this error, most times the issue is on the website you&#;re trying to visit and, in that case, not much can be done from your end. In other instances, error occurs because of a problem with your networking equipment or computer. An important factor to note is that website developer or web hosts can customize how this error is displayed.

Take a look at some common ways the error is displayed:

  • Error
  • Temporary Error ()
  • Bad Gateway
  • Proxy Error
  • HTTP
  • That&#;s an error
  • Service Temporarily Overloaded
  • HTTP Error Bad Gateway
  • Bad Gateway: “The proxy server got an invalid response from an upstream server”
  • Server Error: “The server encountered a temporary error and could not complete your request”

There are other platforms and services that display the error slightly differently. Twitter usually displays the following message: &#;Twitter is over capacity&#;. While Google will display a message: “ That&#;s an error. The server encountered a temporary error and could not complete your request. Let&#;s try again in 30 seconds&#;.

If the error Bad Gateway lasts for a few minutes on your website, then there won&#;t be a major impact and you won&#;t have to worry much about your ranking. However, if the error continues for hours without a resolution Google will take note of this and that can result in your website rank moving downwards. Thankfully, there are few effective solutions that can be implemented to fix the Bad Gateway error and help improve your site ranking. Below you will find the most effective fixes for error Bad Gateway.

How to fix the Bad Gateway Error

  1. Reload
  2. Check for server connectivity issues
  3. Browse in Safe Mode
  4. Look for DNS changes
  5. Clear browser cache
  6. Check with your hosting provider

1. Reload

Simply reloading the browser a few times can quickly resolve the issue. Most times the error is temporary and something as simple as a quick refresh will resolve the problem. If the error isn’t resolved instantly you can re-try in a few minutes.

2. Check for Server connectivity issues

Websites normally live on numerous servers or hosting providers. A server can go down for any reason and this can lead to you receiving a Bad Gateway Error code. Troubleshooting is out of your hands for this one as the only thing you can do is wait for the server to complete maintenance or resolve the problem causing the error. If contacting your host is out of the picture you can run a ping test to confirm if messages are reaching your IP.

3. Browse in Safe Mode

Disabling extensions and add-ons is another way you can try to resolve the HTTP status code error. Browsing in safe mood deletes all your searches, cookies, and history once your session had ended. Using any browser of choice, enter Safe mode and just reload your page. Once the Bad Gateway error disappears, then it&#;s safe to say that some setting or browser extension was causing the issue.

4. Look for DNS changes

DNS problems can sometimes cause the error Deciding to change your DNS server may not resolve the issue, however, it can possibly be the answer. Moving your IP address or changing host servers can cause the Bad Gateway error to pop up until changes are made to the website&#;s DNS server.

5. Clear browser cache

The types of files stored on your browser can also cause Bad Gateway errors. Going to your browser setting and clearing cached files and reloading the page may just resolve the problem.

6. Check with your hosting provider

If you&#;ve tried all the suggestions above and they didn&#;t work, you need to contact your host provider. They can take a more in-depth look into what&#;s happening and possibly be the light at the end of the tunnel. The issue can either be on their end and they can easily fix it or if the issue is related to your website they can assist with providing steps to resolve bad Gateway as well.

Conclusion

An important aspect of any website is to ensure that you&#;re aware of the best methods to boost its performance and ensure that you have a genuine fix to any problem that may arise. If you receive the Bad Gateway error or users are receiving it on your website, don&#;t panic, you can always use the steps provided above to guide you through resolving this popular error. You also need to ensure you have a great web host. Monsterhost offers robust web hosting with secure high-velocity servers, start with 10GB storage and 10 free custom emails in our WP starter pack.

What Is the HTTP Status Code Error and How Do You Fix It?

What is worse than trying to reach a website only to be haunted by a HTTP status code message? It mostly shows up in the form of a Bad Gateway error, but any messages falling under the 5xx spectrum are called HTTP response status code errors indicating that an invalid response was provided by the destination server.

Any error starting with a is always a server-side error, meaning the issue is with the hosting web server. So, before you start scrambling to call your internet provider, let us discuss the various reasons behind its appearance and simple ways to fix it.

Various Flavors of the Status Code Errors

Due to browser variations, operating systems, and the like, a HTTP status code error message may come in different wordings but they all convey the same meaning.

Whether you are a website developer or a web junkie, becoming familiar with this error message can be valuable in diagnosing and fixing website configuration errors and your browsing experience.

Here is a list of common status code variations that you may stumble across:

  • Bad Gateway
  • Service Temporarily Overloaded
  • Error
  • Temporary Error ()
  • Proxy Error
  • Server Error: The server encountered a temporary error and could not complete your request.
  • HTTP
  • That's an error
  • Bad Gateway: The proxy server received an invalid response from an upstream server.
  • HTTP Error - Bad Gateway

Did you know that Twitter’s famous "fail whale" image that declares that Twitter is over capacity is in fact a Bad Gateway error?

Reasons Behind the HTTP Status Code Error

Communication issues between online servers or DNS issues such as incorrectly cached IP addresses play a big role in the appearance of this annoying error. However, there are a few other culprits at play as well:

The Server Is Inaccessible

This error code is a by-product of a source or origin server being out of order. A range of connectivity issues, a server that is powered down, or spikes in traffic can all lead to this message.

DNS Issues

DNS issues are a major underlying reason behind this error. If the DNS records are misconfigured at the hosting level, the domain name will not resolve to the IP address causing this error to pop up.

Also, keep in mind that most DNS changes take time to propagate and DNS changes have to abide by the TTL (Time To Live) threshold before being implemented. This delay can also generate the Bad Gateway error message.

Read More: What Is a DNS Server and Why Is It Unavailable?

Blocks and Firewalls

Are you behind a firewall? Depending on the firewall settings, communication between servers can be disrupted and, in some cases, certain websites with security plugins can also block out your local IP address.

Browser Issues

At times, outdated browser versions and certain browser extensions like AdBlock can be the main reason behind the appearance of a error message.

Server Failure

A failed server will most likely generate a error code. Many reasons including system crashes and servers being taken down for maintenance purposes can render servers temporarily useless. In rare cases, a server failure could also happen if the content hosted on a server is in violation of the terms and services set forth by the provider.

Now that you know the reasons behind this status code error, let us explore the ways to fix it.

Ways to Fix The Status Code Error Message

Whether you are a site owner or just surfing the web, the following tips can help keep the pesky error message at bay:

Reload the Website

The fix can be as simple as waiting for a couple of minutes and reloading the website as network congestion issues can sometimes make the server take longer to respond.

Cleare the Browser Cache

Sometimes the error message can appear if the browser is loading the website from the cache. Simply clearing out your browser’s cache can fix this error in most cases. Caching is a great way for speeding up your browsing experience, but it is worth it to clear it from time to time.

Read More: How to Clear Cookies and Cache in Chrome

Disable the Firewall

A firewall provides an extra sheath of security between your browser and the destination server, but many firewalls are overly sensitive and can block out all inbound requests. If you face the error message, try disabling the firewall or the CDN if you are behind one.

If the error disappears after disabling it, then that means your firewall was the main culprit.

Update the Themes and Plugins

Website and browser plugins can sometimes cause the status code error as well. Simply disable all the plugins. If this resolves the error message, then activate each plugin one by one until you catch the one that was generating the error.

If you are hosting a website and disabling the plugins does not help, then try updating your website theme. Many websites hosted on platforms like WordPress or Wix need regular theme updates to function properly.

Check With the Provider

If your website is still generating a error code even after trying the previous tips, then it is worth reaching out to your hosting server. Most hosting providers have customer support teams that can triage the issue with you.

Read More: How to Access Websites That Won't Load: 5 Methods to Try

The Bottom Line on the HTTP Status Code Error

A error can be quite aggravating as it can be caused by an assortment of issues. Troubleshooting the Bad Gateway error takes a lot of effort, but with a little bit of patience, and the guidelines provided in this article, you should be able to resolve it in no time.

So, what are you waiting for? Put your techie glasses on and start troubleshooting the pesky and other website error messages!

http error 502

Http error 502 - confirm

Bad Gateway Error, Quick guide to fix it (Updated)

Understand the the HTTP Bad Gateway error: What are the causes and how to fix them.

Table of Contents

What is the Bad Gateway error?

The HTTP Bad Gateway response status code indicates that your server is behind a proxy (e.g. a CDN, a Load Balancer, a Firewall, &#;), and it is not visible. For instance, your CDN or Firewall can&#;t reach your web server and your content can&#;t be served to the user.

Error Bad Gateway sent by Cloudflare

Different error messages

  • “Error Bad gateway”
  • “Proxy Error. The proxy server received an invalid response from an upstream server.”
  • “ Bad Gateway Nginx”
  • “HTTP ”
  • “ Service Temporarily Overloaded”
  • “ Server Error: The server encountered a temporary error and could not complete your request”
  • “ That’s an error. The server encountered a temporary error and could not complete your request”
  • “Temporary Error ()”
 That’s an error. The server encountered a temporary error and could not complete your request

The following sections show you the causes, and how to fix the error:

Bad Gateway causes

The error means that the proxy service acting as Gateway has a problem getting the content from your server. This proxy service you have in front of your site server can be a CDN, a Load Balancer, a Firewall, etc.

Here you have a list of all the different causes:

  • There is a network problem between your server and your proxy service.
  • Your server is blocking access to the proxy service.
  • Your server is down.
  • Your server is up but can&#;t handle more connections.
  • Some server requests return an error.
  • There is an invalid or incorrect DNS zone.

How to fix the Bad gateway error code

You can follow the next steps to find and fix the error:

1 Verify your server is up and running

This is the first step you have to verify. Login to your server console or panel and verify that all web services are running.

2 Verify your server is reachable

Temporarily disable the proxy service or skip it forcing your domain DNS zones. We describe below the two methods:

Verify your server bypassing your proxy service

You can bypass the proxy service by pointing your domain name directly to the IP of your server.

You can force the DNS zones, modifying the host file of your computer.

You have tools to help you like:
SwitchHosts for Mac OSX or
HostsFileEditor for Windows.

Verify your server by disabling the proxy service

As an alternative to verify if your server is reachable, you can temporarily disable your proxy service.

If you are using Cloudflare, you can easily disable it from the admin panel. Log in and in the right sidebar, find Quick Actions and enable &#;Development Mode&#;:

Enable the Development Mode in Cloudflare.

Verify your server is reachable around the World

If you can temporarily disable the proxy service, the next recommended checkpoint is to verify if this server is reachable across different networks.

We recommend you the Uptrends Website Uptime Test online tool:

Uptrends Website Uptime Test result

This Uptrends tool checks your site from different country nodes. If some check fails, this will help you identify potential network problems.

3 Verify your server load

If your web server reaches its limit, it can’t answer any more requests, and the gateway delivers the status code Bad Gateway. The reason could be an unexpectedly high interest in the site or even a DDoS attack. This means that an attacker is using a bot network to help overload the server capacity and provoke a system failure.

Your proxy service, CDN, or Load Balancer may be ready to handle high volumes of traffic, but that doesn&#;t mean your web server is. With WordPress websites, it is extremely easy to overload the server, since there are many pages with high processing time and that we cannot serve from cache.

The best solution in case of non-legit traffic is to be protected by a CDN or Firewall service capable of filtering traffic, and ready to deal with DoS and DDoS attacks.

At Wetopi, as WordPress specialists, we know how important it is to add strong measures of security.
We apply three techniques to filter traffic:

Shared security heuristic learning,
Blacklisting from external sources and
Mitigation of DDoS attacks.

If your traffic is legit, the solutions are obvious:

  • Add cache to your site.
  • If a cache system is not enough, then add more resources to your server.
  • If you cannot financially face the increase in resources, the final option is to lighten your website. If you work with WordPress, reduce the number of plugins to the essential minimum.

4 Verify the resource limits of your hosting

If your website is in a shared hosting, check that you&#;re not overstepping resource limits.

The establishment of limits is not something that you can find among the functionalities of a &#;shared hosting&#;. But keep in mind that to preserve coexistence between all the sites on a shared server, it is very common for the provider to set limits on processing time, on the number of &#;php workers&#; and on traffic.

One reason you might want to consider moving to a Hosting like Wetopi is that each WordPress installation runs in an isolated host that contains all of the software resources required to run the site (Linux, Nginx, Php-fpm, MySQL). This means that the software that runs each site is % private and is not shared, even between your own WordPress sites.

5 Check the CDN or proxy service status

This networking access problem could be a problem with your proxy service. Check the status service page of your proxy service.

This is a list of &#;Status Pages&#; of main providers of Load Balancing, CDN, and Security services:

6 Inspect your server firewall

If your web server has a local firewall: &#;iptables&#;, &#;Uncomplicated Firewall &#; UFU&#;, &#;CSF Firewall&#;, &#;Fail2ban&#;, &#;FireHOL&#;, &#; Then it could be this firewall that is blocking the access to your proxy service.

Inspect the firewall.

iptables blocking different IP addresses.

The best solution, in this case, is to add your proxy service IP addresses to the whitelist system of your firewall.

For instance, at Wetopi, we use and recommend Cloudflare as a CDN and security reverse proxy. To prevent &#; Bad Gateway&#; error problems, our server firewalls have the public list of Cloudflare&#;s IP addresses in the whitelist&#;s system.

7 Inspect the DNS

If you are in the process of publishing your domain or modifying it, the problem could be in the DNS

To fix the error due to a DNS problem follow this checklist:

  • If you have just migrated your site to a new host, is it important to wait for DNS zones to fully propagate, which can take up to 24 hours in some cases. This depends on the TTL value of your DNS records.
  • The domain name is not resolving to the correct IP or it does not resolve to any IP. Verify your DNS zone definition according to the instructions provided by your proxy service: CDN, Load Balancer, Security Service, &#;

8 Check your Database

If you made it this far and none of the above methods work, chances are that the error is caused by an error in your web, or application in a specific page or URL request.

First, you have to check the database health:

  • look for errors in log files
  • repair and/or optimize tables and indexes.
Repair database tables from phpMyAdmin panel

9 Check your WordPress or application

If your database is ok, the final solution to fix the error on a specific web page or URL is to debug your site.

If your site is running with WordPress, try this: disable all your plugins, if the problem disappears, then your error is caused by a WordPress Plugin.

If during a test, you don&#;t want to break your production site:

Clone your server to create a Staging environment!

To clone a WordPress site with Wetopi is as easy as a simple click.

To find the plugin causing the problem, we recommend following this process:

  1. Disable all your plugins.
  2. Check the page that gives you the HTTP Error.
  3. If the page Works, then enable one plugin from the disabled list and jump to the previous step 2.
  4. If the page Fails, then this last enabled plugin could be the one causing the HTTP Error.

We are techies passionate about WordPress. With wetopi, a Managed WordPress Hosting, we want to minimize the friction that every professional faces when working and hosting WordPress projects.

Not a wetopi user?

Free full performance servers for your development and test.
No credit card required.

All HTTP Status Codes

OK

Created

Accepted

Non-Authoritative Information

No Content

Reset Content

Partial Content

Multi-Status

Already Reported

IM Used

Multiple Choices

Moved Permanently

Found

See Other

Not Modified

Use Proxy

Temporary Redirect

Permanent Redirect

Bad Request

Unauthorized

Payment Required

Forbidden

Not Found

Method Not Allowed

Not Acceptable

Proxy Authentication Required

Request Timeout

Conflict

Gone

Length Required

Precondition Failed

Payload Too Large

Request-URI Too Long

Unsupported Media Type

Requested Range Not Satisfiable

Expectation Failed

I’m A Teapot

Misdirected Request

Unprocessable Entity

Locked

Failed Dependency

Upgrade Required

Precondition Required

Too Many Requests

Request Header Fields Too Large

Connection Closed Without Response

Unavailable For Legal Reasons

Client Closed Request

Internal Server Error

Not Implemented

Bad Gateway

Service Unavailable

Gateway Timeout

HTTP Version Not Supported

Variant Also Negotiates

Insufficient Storage

Loop Detected

Not Extended

Network Authentication Required

Network Connect Timeout Error

You can get a bad gateway error when there's a problem with the server of the website you are trying to connect to.
error

In more technical terms, the “” in the error is an HTTP status code which indicates that one server received an invalid response from another server.

There are other categories of errors including:

  • – Not Implemented,
  • – Service Unavailable
  • – Gateway Timeout
  • – HTTP Version not supported
    And many more.

The causes of the bad gateway error include an overloaded server, an error in the code, and yet-to-be-propagated domain names. So the error is often caused by the server of a website and not by you as the user.

But sometimes, the browser might show this error due to past-due updates, ad-blockers, browser extensions and plugins, or even DNS server problems.

In this article, I will show you 4 ways you can fix the bad gateway error so you can access the internet again.

Fix 1: Refresh the Page

Many server errors are only temporary, not permanent, and bad gateway is no exception.

If you’re getting this error, the first thing you should do is refresh the page after a couple of minutes and see if the website loads up again.

To refresh Google Chrome, click on the refresh button in the top-right corner:
ss

Edge also provides the same refresh button in the same position:
ss

If refreshing fails to work, wait a couple of minutes and try again. If the error persists, then proceed to the other fixes in this article.

ADVERTISEMENT

Fix 2: Try to Access the Website on another Device

Your own device – whether it's a computer or phone – could be the reason you’re getting the bad gateway error. In addition, your internet connection source – router or modem – could be the culprit.

Since this could be the cause, try to access the website on another device or switch your internet connection source.

You can also reboot your devices – computer, mobile phone, router, and modem.

Fix 3: Switch to another Browser

Since the cause of the bad gateway error could be due to an outdated browser or ad blockers, you should consider changing to a different browser and see if the error persists.

For example, if you use the Windows operating system and you’re trying to access the website with Chrome and you're getting the bad gateway error, switch to Edge and vice versa. If you are on Mac and you’re getting the error on Chrome, then consider switching to Safari and vice versa.

If you have Mozilla Firefox installed on your computer, you can also switch to it too. You might get a different experience as it is not built on the same Chromium engine Edge and Google Chrome are built on.

If the website loads up in another browser, then you might need to update the initial browser, reinstall it, or check your extensions and ad blockers.

ADVERTISEMENT

Fix 4: Clear your Browser Cache

You might be getting the bad gateway error because your browser stored outdated information about the website you’re trying to visit. So, clearing your browser cache could fix the error.

To clear your Chrome browser cache, follow the steps below

Step 1: Click the 3 vertical dots on the top right corner:
ss

Step 2: Hover on More tools and select Clear browsing data:
ss

Step 3: Make sure you select "Cached images and files" as part of the data to clear, then click on the "Clear data" button:
ss

ADVERTISEMENT

To clear your Microsoft Edge cache, follow the steps below

Step 1: Click on the 3 horizontal dots on the top-right corner:
ss

Step 2: Select Settings:
ss

Step 3: Click on "Privacy, search, and services”.

Step 4: Under, “Clear browsing data”, click on the “Choose what to clear" button:
ss

Step 5: Make sure cached images and files are selected, then select “Clear now”:
ss

Fix 5: Flush your DNS Cache

DNS problems could be the reason you keep getting the bad gateway error while trying to visit a website. So flushing your DNS cache could be a solution.

ADVERTISEMENT

To flush your DNS cache on Windows 10, follow the steps below:

Step 1: Click on Start, type “cmd”, then select “Run as Administrator” on the right:
cmd-admin-1

Step 2: Type in “ipconfig /flushdns” and hit .
You should get a response that the DNS cache has been flushed, like the one below:
ss

This means all caches will be cleared and websites will be loaded freshly for you.

If you use Chrome, it has its own DNS cache

To flush Chrome’s DNS, type in the address bar and hit , then click “Clear host cache”:
ss

ADVERTISEMENT

If you use Edge, it has its own DNS cache too

To flush Edge’s DNS, type in the address bar and hit , then click “Clear host cache”:
ss

Conclusion

While it is unlikely for the error to come from the user-side (as it’s a server-related error), you can still try some fixes on your end as the user. That’s why I wrote this article to show you how you can fix the error from your end.

Thank you for reading.

If you read this far, tweet to the author to show them you care.

Learn to code for free. freeCodeCamp's open source curriculum has helped more than 40, people get jobs as developers. Get started

What Is the HTTP Status Code Error and How Do You Fix It?

What is worse than trying to reach a website only to be haunted by a HTTP status code message? It mostly shows up in the form of a Bad Gateway error, but any messages falling under the 5xx spectrum are called HTTP response status code errors indicating that an invalid response was provided by the destination server.

Any error starting with a is always a server-side error, meaning the issue is with the hosting web server. So, before you start scrambling to call your internet provider, let us discuss the various reasons behind its appearance and simple ways to fix it.

Various Flavors of the Status Code Errors

Due to browser variations, operating systems, and the like, a HTTP status code error message may come in different wordings but they all convey the same meaning.

Whether you are a website developer or a web junkie, becoming familiar with this error message can be valuable in diagnosing and fixing website configuration errors and your browsing experience.

Here is a list of common status code variations that you may stumble across:

  • Bad Gateway
  • Service Temporarily Overloaded
  • Error
  • Temporary Error ()
  • Proxy Error
  • Server Error: The server encountered a temporary error and could not complete your request.
  • HTTP
  • That's an error
  • Bad Gateway: The proxy server received an invalid response from an upstream server.
  • HTTP Error - Bad Gateway

Did you know that Twitter’s famous "fail whale" image that declares that Twitter is over capacity is in fact a Bad Gateway error?

Reasons Behind the HTTP Status Code Error

Communication issues between online servers or DNS issues such as incorrectly cached IP addresses play a big role in the appearance of this annoying error. However, there are a few other culprits at play as well:

The Server Is Inaccessible

This error code is a by-product of a source or origin server being out of order. A range of connectivity issues, a server that is powered down, or spikes in traffic can all lead to this message.

DNS Issues

DNS issues are a major underlying reason behind this error. If the DNS records are misconfigured at the hosting level, the domain name will not resolve to the IP address causing this error to pop up.

Also, keep in mind that most DNS changes take time to propagate and DNS changes have to abide by the TTL (Time To Live) threshold before being implemented. This delay can also generate the Bad Gateway error message.

Read More: What Is a DNS Server and Why Is It Unavailable?

Blocks and Firewalls

Are you behind a firewall? Depending on the firewall settings, communication between servers can be disrupted and, in some cases, certain websites with security plugins can also block out your local IP address.

Browser Issues

At times, outdated browser versions and certain browser extensions like AdBlock can be the main reason behind the appearance of a error message.

Server Failure

A failed server will most likely generate a error code. Many reasons including system crashes and servers being taken down for maintenance purposes can render servers temporarily useless. In rare cases, a server failure could also happen if the content hosted on a server is in violation of the terms and services set forth by the provider.

Now that you know the reasons behind this status code error, let us explore the ways to fix it.

Ways to Fix The Status Code Error Message

Whether you are a site owner or just surfing the web, the following tips can help keep the pesky error message at bay:

Reload the Website

The fix can be as simple as waiting for a couple of minutes and reloading the website as network congestion issues can sometimes make the server take longer to respond.

Cleare the Browser Cache

Sometimes the error message can appear if the browser is loading the website from the cache. Simply clearing out your browser’s cache can fix this error in most cases. Caching is a great way for speeding up your browsing experience, but it is worth it to clear it from time to time.

Read More: How to Clear Cookies and Cache in Chrome

Disable the Firewall

A firewall provides an extra sheath of security between your browser and the destination server, but many firewalls are overly sensitive and can block out all inbound requests. If you face the error message, try disabling the firewall or the CDN if you are behind one.

If the error disappears after disabling it, then that means your firewall was the main culprit.

Update the Themes and Plugins

Website and browser plugins can sometimes cause the status code error as well. Simply disable all the plugins. If this resolves the error message, then activate each plugin one by one until you catch the one that was generating the error.

If you are hosting a website and disabling the plugins does not help, then try updating your website theme. Many websites hosted on platforms like WordPress or Wix need regular theme updates to function properly.

Check With the Provider

If your website is still generating a error code even after trying the previous tips, then it is worth reaching out to your hosting server. Most hosting providers have customer support teams that can triage the issue with you.

Read More: How to Access Websites That Won't Load: 5 Methods to Try

The Bottom Line on the HTTP Status Code Error

A error can be quite aggravating as it can be caused by an assortment of issues. Troubleshooting the Bad Gateway error takes a lot of effort, but with a little bit of patience, and the guidelines provided in this article, you should be able to resolve it in no time.

So, what are you waiting for? Put your techie glasses on and start troubleshooting the pesky and other website error messages!

 Bad Gateway error message on a laptop computer

A Bad Gateway Error occurs when you try to visit a web page, but one web server gets an invalid response from another. Normally, the problem is on the website itself, and there&#;s nothing you can do. Other times, this error occurs because of a problem with your computer or networking equipment.

What is a Bad Gateway Error?

A Bad Gateway Error means that the web server you&#;ve connected to is acting as a proxy for relaying information from another server, but it has gotten a bad response from that other server. It&#;s called a error because that&#;s the HTTP status code that the webserver uses to describe that kind of error.

These bad responses could be due to a number of different causes. It&#;s possible the server is overloaded or there are network issues between the two servers, and it&#;s just a temporary problem. It&#;s also possible there&#;s an improperly configured firewall or even a coding error, and that the problem won&#;t get fixed until those issues are addressed.

Just like with errors, website designers can customize how a error looks. So, you might see different-looking pages on different websites. Websites might also use slightly different names for this error. For example, you might see things like:

  • HTTP Error Bad Gateway
  • HTTP
  • Service Temporarily Overloaded
  • Temporary Error ()
  • Server Error: The server encountered a temporary error and could not complete your request
  • Bad Gateway Nginx

The vast majority of the time, this is just an error on the server-side of things that you won&#;t be able to do anything about. Sometimes, it&#;s a temporary error; sometimes it isn&#;t. Still, there are some things you can try on your end of things.

Refresh the Page

Refreshing the page is always worth a shot. Many times the error is temporary, and a simple refresh might do the trick. Most browsers allow you to refresh the page by pressing Ctrl+R on Windows or Cmd+R on Mac, and also provide a Refresh button somewhere on the address bar.

It doesn&#;t fix the problem very often, but it takes just a second to try.

Check if the Site Is Down for Other People

Whenever you fail to reach a site (for whatever reason), you can also check if it&#;s just you that&#;s having a problem connecting, or if other people are having the same trouble. There are lots of tools out there for this, but our favorites are sprers.eu and sprers.eu Both work pretty much the same. Type in the URL you want to check, and you&#;ll get a result like this.

Server status check ran on isitdownrightnow's website

If you get a report saying the site is down for everyone, there&#;s not much you can do but try again later. If the report shows that the site is up, then the problem might be on your end. It&#;s very rare this is the case with a error, but it is possible, and you can try some of the things we describe in the next few sections.

Try Another Browser

It&#;s possible that an issue with your browser might be causing the Bad Gateway error. One easy way to check this out is to use a different browser and see if it works. You can use Google Chrome, Mozilla Firefox, Apple Safari, or Microsoft Edge. If you can see the error in the new browser as well, then you know it&#;s not a browser issue, and you should try another solution.

Clear Your Browser&#;s Cache and Cookies

If trying a different browser works, it&#;s possible that your main browser has cached outdated or corrupt files that might be causing the error. Removing these cached files and trying to open the website could solve the problem.

Clear cookies and site data in your browser to see if they're causing problems

It&#;s certainly worth trying, and we&#;ve got a handy guide for you on how to clear your history in any browser.

RELATED:How to Clear Your History in Any Browser

Check Your Plugins and extensions

If you use extensions on your browser, then it&#;s possible that one or more of the extensions are causing the problem. Try disabling all your extensions and then accessing the website. If the error disappears after that, then it&#;s likely that a plugin is causing the issue. Enable your plugins one by one to find the culprit.

Disable extensions one-by-one to find any that might be causing issues

RELATED:How to Uninstall Extensions in Chrome, Firefox, and Other Browsers

Restart Your Devices

So, you&#;ve used a site checking tool and determined that the site is just down for you. And, you&#;ve tested another browser and are having the same problem. So you know the problem is likely something on your end, but it&#;s not your browser.

It is possible that there are some strange, temporary issues with your computer or your networking equipment (Wi-Fi, router, modem, etc.). A simple restart of your computer and your networking devices might help fix the problem.

Change your DNS Servers

Sometimes, DNS problems can cause errors. Changing your DNS servers is not a likely fix, but it is a possible one. And it&#;s not too hard to do. Unless you&#;ve changed them yourself, your DNS servers are probably be set by your ISP. You can change them to a third-party DNS server like OpenDNS or Google DNS, and that might solve the problem.

And there are other reasons you might want to change DNS servers, too&#;like better speed and reliability.

RELATED:The Ultimate Guide to Changing Your DNS Server

What is Bad Gateway Error &#; How to fix it?

The error Bad Gateway has been experienced by the majority, if not all, internet users. You usually have no idea what happened or why it did. However, you received an error and must now reload the page several times. If this has ever frustrated you, than this article is here to help. Here, we’ll take a closer look into the error Bad Gateway, what it is, and what to do once you encounter this error. Let’s kick things off by getting a better understanding of what the error Bad Gateway means.

What is Bad Gateway?

The error Bad Gateway is an HTTP status code indicating that something may have gone wrong with a website&#;s server communication. While doing a search online, the server receives your request then sends a response along with an HTTP header and status code. However, The Bad Gateway server error response code indicates that the server received an erroneous response from the upstream server while functioning as a gateway or proxy.

You won&#;t actually know the exact issue with the website because it is a generic error. When you receive this error, most times the issue is on the website you&#;re trying to visit and, in that case, not much can be done from your end. In other instances, error occurs because of a problem with your networking equipment or computer. An important factor to note is that website developer or web hosts can customize how this error is displayed.

Take a look at some common ways the error is displayed:

  • Error
  • Temporary Error ()
  • Bad Gateway
  • Proxy Error
  • HTTP
  • That&#;s an error
  • Service Temporarily Overloaded
  • HTTP Error Bad Gateway
  • Bad Gateway: “The proxy server got an invalid response from an upstream server”
  • Server Error: “The server encountered a temporary error and could not complete your request”

There are other platforms and services that display the error slightly differently. Twitter usually displays the following message: &#;Twitter is over capacity&#;. While Google will display a message: “ That&#;s an error. The server encountered a temporary error and could not complete your request. Let&#;s try again in 30 seconds&#;.

If the error Bad Gateway lasts for a few minutes on your website, then there won&#;t be a major impact and you won&#;t have to worry much about your ranking. However, if the error continues for hours without a resolution Google will take note of this and that can result in your website rank moving downwards. Thankfully, there are few effective solutions that can be implemented to fix the Bad Gateway error and help improve your site ranking. Below you will find the most effective fixes for error Bad Gateway.

How to fix the Bad Gateway Error

  1. Reload
  2. Check for server connectivity issues
  3. Browse in Safe Mode
  4. Look for DNS changes
  5. Clear browser cache
  6. Check with your hosting provider

1. Reload

Simply reloading the browser a few times can quickly resolve the issue. Most times the error is temporary and something as simple as a quick refresh will resolve the problem. If the error isn’t resolved instantly you can re-try in a few minutes.

2. Check for Server connectivity issues

Websites normally live on numerous servers or hosting providers. A server can go down for any reason and this can lead to you receiving a Bad Gateway Error code. Troubleshooting is out of your hands for this one as the only thing you can do is wait for the server to complete maintenance or resolve the problem causing the error. If contacting your host is out of the picture you can run a ping test to confirm if messages are reaching your IP.

3. Browse in Safe Mode

Disabling extensions and add-ons is another way you can try to resolve the HTTP status code error. Browsing in safe mood deletes all your searches, cookies, and history once your session had ended. Using any browser of choice, enter Safe mode and just reload your page. Once the Bad Gateway error disappears, then it&#;s safe to say that some setting or browser extension was causing the issue.

4. Look for DNS changes

DNS problems can sometimes cause the error Deciding to change your DNS server may not resolve the issue, however, it can possibly be the answer. Moving your IP address or changing host servers can cause the Bad Gateway error to pop up until changes are made to the website&#;s DNS server.

5. Clear browser cache

The types of files stored on your browser can also cause Bad Gateway errors. Going to your browser setting and clearing cached files and reloading the page may just resolve the problem.

6. Check with your hosting provider

If you&#;ve tried all the suggestions above and they didn&#;t work, you need to contact your host provider. They can take a more in-depth look into what&#;s happening and possibly be the light at the end of the tunnel. The issue can either be on their end and they can easily fix it or if the issue is related to your website they can assist with providing steps to resolve bad Gateway as well.

Conclusion

An important aspect of any website is to ensure that you&#;re aware of the best methods to boost its performance and ensure that you have a genuine fix to any problem that may arise. If you receive the Bad Gateway error or users are receiving it on your website, don&#;t panic, you can always use the steps provided above to guide you through resolving this popular error. You also need to ensure you have a great web host. Monsterhost offers robust web hosting with secure high-velocity servers, start with 10GB storage and 10 free custom emails in our WP starter pack.

Bad Gateway Error

The Bad Gateway error is an HTTP status code that means that one server on the internet received an invalid response from another server.

Bad Gateway errors are completely independent of your particular setup, meaning that you could see one in any browser, on any operating system, and on any device.

The Bad Gateway error displays inside the internet browser window, just like web pages do.

What Does a Bad Gateway Error Look Like?

The Bad Gateway can be customized by each website. While it's fairly uncommon, different web servers do describe this error differently.

Below are some common ways you might see it:

  • Bad Gateway
  • Service Temporarily Overloaded
  • Error
  • Temporary Error ()
  • Proxy Error
  • Server Error: The server encountered a temporary error and could not complete your request
  • HTTP
  • That's an error
  • Bad Gateway: The proxy server received an invalid response from an upstream server
  • HTTP Error - Bad Gateway

Twitter's famous "fail whale" error that says Twitter is over capacity is actually a Bad Gateway error (even though a Error would make more sense).

A Bad Gateway error received in Windows Update generates a 0x error code or the message WU_E_PT_HTTP_STATUS_BAD_GATEWAY.

When Google services, like Google Search or Gmail, are experiencing a Bad Gateway, they often show Server Error, or sometimes just , on the screen.

What Causes a Bad Gateway Error?

Bad Gateway errors are often caused by issues between online servers that you have no control over. However, sometimes, there is no real issue but your browser thinks there's one thanks to a problem with your browser, an issue with your home networking equipment, or some other in-your-control reason.

Microsoft IIS web servers often give more information about the cause of a particular Bad Gateway error by adding an extra digit after the , as in HTTP Error - Web server received an invalid response while acting as a gateway or proxy, which means Bad Gateway: Forwarder Connection Error (ARR).

An HTTP Error - Bad Gateway error refers to a CGI application timeout problem and is better to troubleshoot as a Gateway Timeout issue.

How to Fix a Bad Gateway Error

The Bad Gateway error is often a network error between servers on the internet, meaning the problem wouldn't be with your computer or internet connection.

However, since it is possible that there's something wrong on your end, here are some fixes to try:

  1. Try loading the URL again by pressing F5 or Ctrl+R (Command+R on a Mac) on your keyboard, or by selecting the refresh/reload button.

    While the Bad Gateway error is usually indicating a networking error outside of your control, it could be extremely temporary. Trying the page again will often be successful.

  2. Start a new browser session by closing all open browser windows and then opening a new one. Then try opening the web page again.

    It's possible that the error you received was due to an issue on your computer that occurred sometime during this use of your browser. A simple restart of the browser program itself could solve the problem.

  3. Clear your browser's cache. Outdated or corrupted files that are being stored by your browser could be causing Bad Gateway issues.

    Removing those cached files and trying the page again will solve the problem if this is the cause.

  4. Delete your browser's cookies. For similar reasons as mentioned above with cached files, clearing stored cookies could fix a error.

    If you'd rather not clear all of your cookies, you could first try removing only those cookies related to the site you're getting the error on. It's best to remove them all but it won't hurt to try the clearly applicable one(s) first.

  5. Start your browser in Safe Mode: Firefox, Chrome, MS Edge, or Internet Explorer. Running a browser in Safe Mode means to run it with default settings and without add-ons or extensions, including toolbars.

    If the error no longer appears when running your browser in Safe Mode, you know that some browser extension or setting is the cause of the problem. Return your browser settings to default and/or selectively disable browser extensions to find the root cause and permanently fix the problem.

    A browser's Safe Mode is similar in idea to the Safe Mode in Windows but it's not the same thing. You do not need to start Windows in Safe Mode to run any browser in its particular "Safe Mode."

  6. Try another browser. Popular browsers include Firefox, Chrome, Edge, Opera, Internet Explorer, and Safari.

    If an alternative browser doesn't produce a Bad Gateway error, you now know that your original browser is the source of the problem. Assuming you've followed the above troubleshooting advice, now would be the time to reinstall your browser and see if that corrects the problem.

  7. Restart your computer. Some temporary issues with your computer and how it's connecting to your network could be causing errors, especially if you're seeing the error on more than one website. In these cases, a restart would help.

  8. Restart your networking equipment. Issues with your modem, router, switches, or other networking devices could be causing Bad Gateway or other errors. A simple restart of these devices could help.

    The order you turn off these devices isn't particularly important, but be sure to turn them back on from the outside in. Check out that link above for more detailed help on restarting your equipment if you need it.

  9. Change your DNS servers, either on your router or on your computer or device. Some Bad Gateway errors are caused by temporary issues with DNS servers.

    Unless you've previously changed them, the DNS servers you have configured right now are probably the ones automatically assigned by your ISP. Fortunately, a number of other DNS servers are available for your use that you can choose from.

  10. Contacting the website directly might also be a good idea. Chances are, assuming they're at fault, the website administrators are already working on correcting the cause of the Bad Gateway error, but feel free to let them know about it.

    Most websites have social networking accounts they use to help support their services. Some even have telephone and email contacts.

    If you suspect that a website is down for everyone, especially a popular one, checking Twitter for chatter about the outage is often very helpful. The best way to do this is to search for #websitedown on Twitter, as in #cnndown or #instagramdown. There are other ways to see if a website is down if social media isn't helpful.

  11. Contact your internet service provider. If your browser, computer, and network are all working and the website reports that the page or site is working for them, the Bad Gateway issue could be caused by a network issue that your ISP is responsible for.

  12. Come back later. At this point in your troubleshooting, the Bad Gateway error message is almost certainly an issue with either your ISP or with the website's network—one of the two parties might have even confirmed that for you if you contacted them directly. Either way, you're not the only one seeing the error and so you'll need to wait until the problem is solved for you.

Thanks for letting us know!

0 Comments

Leave a Comment