Are you trying to access your website and coming across the 504 gateway timeout error? This is a common error for WordPress websites and can be quite alarming when you don’t know why it is happening.
The downside of this error is that it does not specify it’s cause, your website becomes inaccessible to your users, and this can directly impact traffic. It is frustrating for you and your potential website visitors…
But don’t panic. In this post we are going to find out what causes the 504 gateway timeout error and the top 5 ways to fix the error on your own.
What causes the 504 gateway timeout error?
When things are working normally, every time you visit your site a request is sent from your web browser to your website server. In the server, the request is processed and you’re then able to see your requested material or web page on your browser.
If for any reason your website server is unable to process your request, then you will be faced with the dreaded 504 gateway timeout error.
The most common cause of this is that your website’s main server has timed out while waiting for a response from an upstream server. This can happen for a variety of reasons but because this is a server error, how this error is displayed on your website depends on your hosting.
Below are some common error messages that indicate that you have a 504 gateway timeout error.
- 504 gateway timeout
- Gateway timeout error
- HTTP 504
- Error 504
- 504 Error
- Gateway timeout (504)
- HTTP Error 504 - Gateway timeout
- A blank white screen (White screen of death)
- This domain isn’t working - Domain took too long to respond
How to fix ‘504 gateway timeout error WordPress’?
Even though the 504 gateway timeout error is mainly caused by the server, there are a few different approaches you can try to solve this problem.
At least one of the suggested solutions below should help fix this error for you. If none of these options solve your issue, get in touch with us for some more thorough help at the bottom of this page.
1. Try Reloading The Page Again
Sometimes the 504 gateway timeout error may be caused by a temporary glitch beyond you. So, before you start applying the next solutions, wait for a bit and refresh your web page to see if it’s back live. It may be as simple as this - best case scenario.
2. Check Your Internet Connection
Sometimes the culprit behind this error can be your own internet connection.
First, you will want to reboot whatever you use for internet connectivity. After doing that, reload your page once more to see if it is working again. If not, proceed to the next option.
The second option applies if your internet connection operates through a proxy server. First, try opening your requested web page on a different device or using a different internet connection (for example the one on your phone when not connected to wifi).
If the 504 gateway timeout error does not appear on other devices and through alternative internet connection then you might have to change your internet connections settings.
- Search for network and internet settings on your PC
- Set the use proxy server option to off
For browser settings, follow these steps for different browsers.
3. Disable Your Firewall
Sometimes your firewall could be what is causing this error. Particularly the DNS level firewall. If you have a separate DNS level firewall from the DNS level firewall offered by your hosting provider installed on your website - disable it.
After disabling your firewall, reload your website to see if it is back online. If it’s back online, you are going to have to directly contact your firewall service providers and tell them the problem you have.
What usually happens is that your hosting server blocks your firewall’s IP addresses. This means you will also have to contact your hosting provider and ask them to whitelist your firewall IP addresses.
If you use windows pc, you might have to disable the firewall set on your pc too.
- Go control panel and search for updates and security settings
- Choose Windows security >> Virus and threat protection >> manage settings
- Deactivate firewall
4. Check And Change DNS Servers On Your Computer
Just like your website, internet connection is translated by DNS servers on your computer. In doing so, your computer is able to connect to different website servers on the internet.
A 504 gateway timeout error can be present if these DNS servers are down. In this case, go to your Windows computer >> search for control panel >> Click the Network and Sharing Centre screen.
A box with general and alternate configuration settings should appear. On the general settings, you should see a small box that says “Obtain DNS server address automatically”. Change your DNS server address from 8.8.8.8 to 8.8.4.4 and save changes.
5. Check And Change DNS Servers On Your Server
Your website has DNS servers that translate domain names to different IP addresses. This happens so that browsers trying to access your website can load your website content.
When DNS server configurations are not correct, a 504 gateway timeout error can occur. This problem usually happens when a site has been migrated but DNS servers were not updated.
You can apply the following solutions:
- Use Whatsmydns or DNSmap to check if the issue is on your computer or for all users.
- Check if the DNS server IP for your website is correct. Your hosting company has to review this as processes vary.
- Temporarily disable cloudflare on your site
These are the top 5 solutions for fixing the dreaded 504 gateway timeout error. The 504 gateway timeout error can cause many people anxiety, especially when they do not know what is causing the issue. Most of the time it is the lag in communication from the upstream server. It will display differently on a variety of sites depending on the hosting.
Hopefully, the first solution worked and it was just a momentary glitch. However, each of the other listed solutions should all help fix the problem.
Further Assistance
If you’re still getting the same error after trying each of these steps, please reach out to us. You may be in need of Developer’s help. We are always available to help so contact us now to help solve the issue. Get in touch.