Press "Enter" to skip to content

Posts published in “Errors”

Error 502 Bad Gateway – 5 quick fixes

What does Error 502 Bad Gateway mean?

Error 502 Bad Gateway is a HTTP status code. It is a general pointer that there’s something that is not right with a website’s server communication. 

This status code shows that the server, while serving as a gateway or proxy, received an invalid response from an inbound server it accessed while trying to achieve the request.

If you want to visit a website on the Internet, your browser sends a request to a server connected to the web. This server receives the request and applies a process to deliver back the resources you demanded, including an HTTP header and an HTTP status code.

In case everything works, users are not going to see the HTTP status code. Simply, this is the way servers interact with each other. However, if something fails, the server will inform you with exactly this code.

Error 502 Bad Gateway can be displayed like:

  • 502 Bad Gateway
  • Temporary Error (502)
  • HTTP 502
  • 502 Proxy Error
  • 502 Service Temporarily Overloaded
  • 502 Server Error: The server faced a temporary error and is not able to complete your request.
  • Bad Gateway: The proxy server got an invalid response from an upstream server.

Let’s observe some of the quick fixes that could help you. 

Reload the page.

The first thing you could try when you face an Error 502 Bad Gateway is simply to wait a moment and reload the page. Of course, the host or the server could be just overloaded. If it is so, the website should come right back.

Also, another thing to quickly try is opening the website through a different browser. 

You can find platforms that can check if the website is actually down or the problem is on your side.

Remove Your Browser Cache

If the error continues, it could be the possibility that your browser cache holds outdated and corrupted data. If this is the case, you should clean the browser cache to fix this error.

It is important to know that removing the cache might lead to losing some essential browser data or bookmarks and preferences, which you set. Therefore, you should export your data from the browser, and after you finish removing the cache, import it back to prevent losing data.

Check for any DNS changes.

A possible reason for facing Error 502 Bad Gateway could be a DNS issue. For example, the domain does not reveal the right IP. 

It is necessary to be patient for things to completely propagate, in case you recently migrated your website to a new host. The required time depends on the TTL value of your DNS records.

Briefly Disable Firewall or CDN

Perhaps there could be an issue with your firewall or Content Delivery Network (CDN). In case you are using a provider of CDN, you can simply disable your CDN for a moment. Then you can test to reach your website again. 

This error is possible to occur sometimes with providers of DDoS protection and mitigation or fully proxy services. This is because they hold an extra firewall in-between. It can often happen if you are using a free plan. 

Suggested article: Error 404 – how to fix it?

Reach your host.

In case you can’t solve the problem on your own, give a call to your host company. They can observe what is going on and deliver more information about the situation.

Perhaps the issue could be on their end, and they could be able to fix it easily. They can also help if the problem is particularly associated with your website.

Error 404 – how to fix it?

Servers have a way to communicate for informing about queries’ status. They do that through different HTTP response status codes, like the error 404.

Once servers receive a query, they start a process to answer the client with the required website. Using different codes, they indicate if it was successfully completed or not, if there was an error and its type, etc. There are five categories of responses.

  • 1, informational responses.
  • 2, successful responses.
  • 3, redirects.
  • 4, client errors.
  • 5, server errors. 

HTTP 404 vs Soft 404

What does error 404 means?

Error 404 is an HTTP response status code that belongs to the category of “client errors”. It means “not found”. 

  • The server can not find the resource that was requested.
  • When it’s about the browser, the meaning is URL is not found.
  • In Application programming interfaces (APIs), the endpoint is valid, but the resource does not exist.

Error 404 very frequently appears online. The web holds plenty of dead or broken links and exactly those that obtain such response status code when clicked.

This code does not give the user information to know if the resource is missing permanently or temporarily. 

Error 404 format

It commonly appears like:

  • Status 404 Not Found 
  • 404 Not Found Error 
  • The requested URL was not found on this server
  • 404 File or Directory Not Found
  • 404 Page Not Found
  • HTTP 404 Not Found

How to fix error 404?

Redirect. Use the response code 301 to redirect browsers. Through this code, you point that content requested is available now with another URL. 

Track broken links (internal and external) on your website and fix them. There are tools to find them, or you can do it manually, but it will take longer. 

Fix internally broken links by correcting typos. Mistakes while writing URLs’ lead to broken links. Moving links to their right places also helps. If you put an article in the wrong category, you can produce a broken link. 

If you include links from different websites (external) and re-located or deleted, this generates broken links on the other site. Delete them or replace them with another site (link) that offers similar info.

Restore cleared pages. People can keep looking for a page you already deleted. If it is possible and it has a sense for your business, restore it. Whenever you delete pages from your site, redirect users to similar content pages to avoid broken links. 

Customize Error 404 for being less annoying. Besides website’s owners, we are Internet users. So we all know how disappointing it is to request a page and not to receive it. If the “Error 404” appears after long waiting, the bad feeling gets worse. For users, not to leave your website definitely, better give the 404 page a nicer look and make it helpful for them. You can explain on it the steps to follow for reaching you later. You can apologize and offer a nice and concerned ‘face’. 

For sure, you have seen designs including cute animals with the popular “oops”. A cute doggie saying, “Oops, I may chewed up the power cord,” can be forgiven easily, don’t you think so? Others prefer fun messages, meme style. Shit happens, and we know that, but a bit of humor can make the difference with your clients not to be so angry.

Be free and creative to design your own custom 404 page.

Other errors from the 4 category

Client’s error category (4) also includes the following codes.

  • 400 Bad Request Status Code.
  • 401 Status Code — Unauthorized Request 
  • 402 Status Code –Payment Required
  • 403 Status Code
  • 405 Status Code — Method Not Allowed Code
  • 406 Not Acceptable
  • 407 Proxy authentication required
  • 408 Request timeout
  • 409 Conflict
  • 410 Gone
  • 411 Length Required
  • 412 Precondition Failed
  • 413 Request Entry Too Large
  • 414 Request URL Too Long
  • 415 Unsupported Media Type
  • 416 Requested Range Not Satisfiable
  • 417 Expectation Failed
  • 422 Unprocessable Entity Status Code

Suggested article: Error 502 Bad Gateway – 5 quick fixes

Conclusion

Error 404 is common but fixable. Digging into the error causes is vital because SEO, bounce rating, and client satisfaction can be affected by such a response. Be prepared to create a friendly and useful 404 page, just in case.