Blog Menu

I write and curate content for Bluehost. I hope this blog post is helpful.
Are you looking at creating a blog, website or an online store? Bluehost has something for everyone. Get started today.

More than half of users will not hesitate to leave a website if it does not load in the expected time, more so if it doesn’t load at all, as these are signs of a bad user experience.

If your blog or eCommerce website frequently exhibits high bounce rates or people tell you they cannot access your site because it displays error messages, it might be worth studying the most common types of errors, such as the 504 Gateway Timeout.

Here, we’ll explore a 504 Gateway Timeout and how to fix it. Let’s dive in.

What is a 504 Gateway Timeout?

A 504 Gateway Timeout error is a type of 5xx error that occurs when a server doesn’t receive a timely response from the other server they were trying to connect to, causing the request to time out. It happens when the other server is down, receives a high volume of requests (overload), malfunctions or undergoes routine maintenance.

504 gateway errors are often associated with two external web servers, but they can also be caused by a server-like entity within the main server, such as a database or reverse proxy server.

What does 504 Gateway Timeout mean?

Servers work by acting as a channel that connects devices to each other.

When you visit a website, your browser’s web server sends a request to the server where the website is hosted. If both servers don’t encounter problems, the request goes through smoothly.

But, when two servers take too long to complete the request, they cannot fulfill their role as a “gateway,” resulting in a 504 Gateway Timeout error.

504 errors are different from a 502 Bad Gateway.

During a 502 error, the server side receives an invalid response from the origin server, while in 504 errors, the server doesn’t receive a response.

Impacts of 504 Gateway Timeout errors

504 Gateway Timeout errors prevent a webpage from loading, negatively affecting the user experience. If these errors occur frequently and persistently, it may lead to search engines deindexing the page from its results.

Downtime duration and crawling frequency matter.

If your WordPress site is down for a few minutes, search engine spiders can crawl it frequently. They can serve users trying to access your page a cached version in the meantime.

But if your website is down for over six hours, search engines like Google might consider it a more serious issue, which can negatively impact your SEO.

What 504 Gateway Timeout errors look like

An HTTP 504 error page can take various forms on devices, programs, browsers and operating systems. Here’s what they can look like.

  • Google Chrome browser:
What a 504 Gateway Timeout looks like on a web browser.
  • Windows updates:
What a 504 Gateway Timeout looks like on a Windows update.
  • Windows programs:
What a 504 Gateway Timeout looks like on a Windows program.

Other variations of the 504 Gateway Timeout error include:

Variations of the 504 Gateway Timeout error.

How to fix 504 Gateway Timeout

The 504 Gateway Timeout error can be hard to diagnose and fix because there’s not one specific thing that causes it. When troubleshooting, try different fixes and eliminate each perceived cause as you go.

You can also use Google Search Console (GSC) to monitor errors but note that GSC cannot determine the cause.

Common causes of 504 Gateway Timeout errors and potential fixes

Here are the common causes and possible fixes for the 504 Gateway Timeout error.

1. Network connectivity issues

Device or internet connections rarely cause 504 errors on their own. But it might be worth checking the user’s modem or router if you’re the only one experiencing it.

Possible fixes:

  • Refresh the page. The error might be temporary.
  • Reload the page in a different browser.
  • Clear your browser’s cache. If the previous fix doesn’t work, try clearing your cache and reloading the page again.
  • Check whether the website is down for everyone or just you. If none of the fixes work, use tools like Is It Down Right Now? or Uptrends to check whether the website is down.
  • Restart your network devices. It doesn’t matter which order you switch off your devices, but it’s important to connect to the devices from the outside in.

Start with the modem, which connects your house to the internet. Then, turn on the router, which connects your wireless devices to the modem.

2. Faulty code, apps, themes and plugins.

If reloading the page doesn’t work, check your website’s plugins, themes or code. They might be submitting several uncached requests and draining your PHP resources — leading to a 504 error.

Possible fixes:

  • Turn off your plugins and themes one by one to determine which one is causing the error.

  • Check the code for bugs. Look through your web server’s access or site’s error logs to see what went wrong.

  • Switch to the default theme. Themes don’t cause 504 errors per se, but faulty implementation and code can contribute to them. Default themes are stable, reliable and the safest choice.

As a preventive measure, remember to update your plugins and themes regularly. That alone prevents most security issues.

3. DNS issues

Computers are hosted in servers that communicate with each other using IP addresses.

But humans visit so many websites that it would be impossible to remember each IP address, so the Domain Name Server (DNS) was born.

The DNS is like a phone directory that computers use to look up the IP address of the website you want to visit.

Migrating your site to a new host, moving to a different IP address or using the incorrect IP address can cause changes to your DNS server, which might prompt your server to show visitors a 504 Gateway Timeout error on the server side and/or client side.

To resolve the error, use a free tool like DNS Checker to see if your DNS has propagated worldwide.

A free tool like DNS Checker lets you check if your DNS has propagated around the world.

If it hasn’t, modify your DNS name. The process can take a few hours to a day. If you don’t know how, contact your hosting provider for assistance.

4. Overloaded server

An overloaded server happens when certain conditions exhaust a server’s resources so other servers cannot connect. Examples include sudden traffic spikes, server maintenance and downtime or distributed denial of service (DDoS) attacks.

Possible fixes:

  • Check server usage. Hosting companies allocate a certain amount of storage or bandwidth for each hosting plan. If your website has reached the plan limit, it will show an error message.

Hosting providers like Bluehost have dashboards or areas where users can check how many resources they have left.

To check resource availability, log into your Bluehost account.

Once you’re in, select Advanced on the left-hand corner of the page. It should look like the photo below. Check the Statistics area on the right side of the page.

How to check server resources on the Bluehost dashboard.

If your storage is nearly full, contact your hosting provider to upgrade to a higher-tiered hosting plan.

  • Increase the maximum execution time limit of your PHP scripts. Server timeouts can also occur when PHP scripts take longer to complete than the set duration. You can accommodate the longer execution time by increasing the time limit.

Installing the Google Pagespeed Insights plugin is one of the easiest ways to do so. Other methods include manually editing your PHP configuration on the control panel or the .htaccess file.

5. Incorrect proxy server settings

Proxy servers function as a firewall and filter, preventing cyberattacks and keeping data private. While they rarely cause 504 Gateway Timeout errors, having incorrect settings can trigger it by blocking access to pages via their IP addresses.

Possible fixes:

  • Check your proxy server settings to see if they are correct.

Go to Settings > Network and Internet > Proxy if you use a Windows operating system. Toggle the switch off.

Changing proxy settings on Windows.

If you’re using a Mac, open the Apple menu > System Settings. Click on Network in the left sidebar and choose a network service on the right. When you open the network service, click Details > Proxies.

Changing proxy settings on Mac.

  • Disable your content delivery network (CDN). Another possible issue could be with your CDN. If your computer can’t reach the other server, your CDN will try to serve the page from the cache.

Note that this isn’t a default setting.

Serving cached content only works seamlessly if the content is static (i.e., photos and HTML files) because dynamic assets can be complicated to cache.

To remedy this, temporarily disable your CDN (or any WordPress plugin you use to connect to a CDN, such as W3 Total Cache) and reload your website.

  • Deactivate your firewall. Incorrect firewall configuration can be interpreted as server attacks and reject access requests. Deactivating your firewall rules it out as a possible cause of the error.

If you use a Windows operating system, go to Settings > Updates & Security (Windows 10) or Privacy and Security (Windows 11) > Windows Security > Firewall and network protection.

Choose from three network profiles: Domain network, private network and public network.

Toggle the Microsoft Defender Firewall switch to Off to deactivate your firewall.

  • Go to System Preferences > Network > Firewall if you use a Mac operating system. Toggle the switch to deactivate it.

Deactivating a firewall on Mac OS.

Final thoughts: What is 504 Gateway Timeout and how to fix it

Improve user experiences and prevent negative SEO by familiarizing yourself with common error messages such as the 504 Gateway Timeout.

This article shares fixes for some of the most common causes of 504 errors. However, when you’ve exhausted all means but the error persists, don’t hesitate to contact your web hosting provider for assistance.

Great hosting companies like Bluehost offer multiple customer service channels such as live chat, email and telephone and hire WordPress professionals that can quickly and easily troubleshoot concerns.

Sign up for a Bluehost web hosting plan today.

  • Devin Sears

    Devin is a Senior Event Marketing Manager for the Bluehost brand. He is our brand steward for all things Bluehost and WordPress. You'll always see him supporting Bluehost at WordCamps around the world!

    Brigham Young University
    Previous Experience
    Social Media, Customer Experience, Field Marketing, Sponsorships, Event Coordinator
Learn more about Bluehost Editorial Guidelines

Write A Comment