How to fix the 504 gateway timeout error?

Error 504Nothing is more worrying and annoying than navigating to your favorite WordPress site and encountering an error. Some common errors are 502 Bad Gateway, Default gateway not available, etc. All these errors, including the 504 Gateway Timeout Error, result in a loss of revenue when users bounce from the site.

Today in this article, we will discuss what causes the 504 error and how to fix it.

What is 504 Gateway Timeout Error?

The HTTP 504 error indicates that the server trying to load the requested page is not getting a timely response from another server.

The HTTP 504 error can appear on any operating system and device in an internet browser. It means that 504 Gateway Timeout Error is not OS dependent.

What Causes the 504 Gateway Timeout Error?

There are variations of 504 gateway timeout errors like HTTP 504 Gateway Timeout, HTTP 504 Error, HTTP 504, Gateway Timeout (504), 504 Gateway Timeout Nginx, etc.

Basically, the HTTP 504 error occurs due to the following reasons:

  • Silent firewall crashes.
  • The origin server is not working correctly or is down.
  • The intermediary server does not respond to the request at a specific time.
  • The local network’s proxy server or router is overloaded or crashes.
  • Incorrect proxy settings.

How to Fix 504 Gateway Timeout Error?

If you encounter the 504 error instead of loading the page, it means there is a server problem on the part of the website provider. Therefore, to fix the gateway timeout error, you can use the following methods:

1. Reload the requested web page

Usually, the error 504 Bad Gateway appears for a while. The easiest solution to fix the 504 gateway timeout error is to refresh the webpage. You can do this by pressing F5 or the Ctrl + R keys. Alternatively, you can enter the URL again.

2. Reset/reboot network devices

When a home network encounters a gateway timeout error, resetting all network devices can fix the problem. There is a chance that the modem and router have been misconfigured, so the HTTP request cannot be carried out.

Additionally, if you encounter an HTTP 504 error on every site you try to access, that is a clear sign that the problem is with the router. You must reset the router to fix the 504 Bad Gateway error message.

3. Check or disable proxy settings

You should check your browser settings if you cannot fix the 504 error after refreshing the page. Usually, if the configuration is wrong or you are using a different proxy, Windows cannot detect the proxy settings.

4. Change DNS server


DNS server helps to connect different servers on the internet. If the DNS server you use is down, you may encounter the 504 Gateway Timeout error. The easiest way to fix this error is to change the DNS server used by the router.

To do this, go to the Control Panel > Network and Sharing Center screen and change the DNS server settings.

On Mac, look for Settings > Network > Advanced button > DNS tab.

After changing the DNS server, now try to visit the website. You should not face the 504 Bad Gateway error.

5. Try again after a while

It may seem too simple, but the 504 error is often not complicated. By simply reloading the web page after a while, you can fix the HTTP 504 error.

6. Try a different browser

Try a different browser if the website works, and you still encounter the 504 gateway timeout error. In addition, you can even try to clear the browser cache and cookies or open it in incognito mode.

7. Flush DNS

Error 504

Sometimes the 504 error can be due to an incorrect outdated DNS cache. To flush DNS, open the run window by pressing Windows + R.

Here, type cmd, and press Ctrl + Shift + Enter.

It will open Command Prompt in Administrator mode. Next, type ipconfig /flushdns. It will help in fixing the 504 gateway timeout error.

8. Adjust the proxy settings

If you are connected to the internet through a proxy server, the site you are trying to access may not be able to get a response. Therefore, to fix the 504 error, you need to disable the network proxy settings, or you can disable them.

You can also contact your internet service provider to correct the problem.

9. Disable VPN

If you are using a VPN service, try disabling it, as this can be one of the reasons behind the HTTP 504 error. If the error goes away, it means VPN is the culprit. However, if using a VPN is essential, switch to a different VPN.

If nothing worked, try disabling the website firewall, as this can be one of the reasons for the gateway timeout. In addition, you can contact your internet service provider for the solution and check plugins. We hope these steps helped you resolve the error.

How to avoid HTTP 504 Gateway Timeout error?

You can do some actions to fix 504 Gateway Timeout Errors on your site, but there is no guaranteed solution to prevent them. You can ensure that visitors continue to have a flawless experience on your site and minimize any adverse effects on your SEO by swiftly resolving this problem.

Also read:- 7 Security Tips To Protect Your WordPress Website From Hackers


The good (and bad) of the 504 error is that it usually originates from an intermediary server, so as a user, you will not be able to do much to solve it. You can generally wait a bit, and the matter will be resolved without your intervention.

However, suppose you are in a hurry. In that case, if you are using an online application and cannot continue working in the meantime, or if the affected website is your own and you are losing traffic, you may want to apply the possible solutions I have suggested above.

How to Install a Free SSL Certificate (2 Tested Methods Explained)

Free SSL

Even a few years ago, there was nothing called free SSL. But now we have it! Thanks to Let’s Encrypt.

In this article, we will explain how to install a Free SSL certificate for WordPress and also on any other website.

What Is An SSL Certificate?

Internet is the place where all the users share a lot of their personal information in various ways, such as signing into a website, purchasing any product, creating free accounts, etc. But, are all these personal information safe. Not when a website is not encrypted. And, here comes the SSL (Secure Socket Layers). It issues a unique certificate to each website that provides encryption technology to secure the information shared through that particular website.

Sponsored by many companies including Facebook, Google, Mozilla, Internet Research Group has come up with a free SSL certificate solution that is known as Let’s Encrypt. It is the best free SSL certificate that is issued for general public.
Read More