The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (2024)

If you've ever visited a website that served you an error page, you know how frustrating it is.

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (1)

One of the worst things you can do as a brand is not meet your audience's needs and expectations. If your website visitors see an error page when they're looking for help or information, they could get frustrated and lose trust in your brand, permanently damaging your reputation.

We're committed to your privacy. HubSpot uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (2)

Free Kit: How to Run an SEO Audit

Use this kit to start running a better website.

  • SEO Template
  • Audit Checklist
  • Introductory Guide
  • And more!

Loading your download form

You're all set!

Click this link to access this resource at any time.

Access now

Learn more

The 504 Gateway Timeout Error is one type of error that can hurt the user experience in this way. To help you avoid losing brand sentiment and consumer trust, we’ve fleshed out exactly what this error means and what its most common causes and solutions are.

What is a 504 Gateway Timeout Error?

A 504 Gateway Timeout Error means your web server didn’t receive a timely response from another server upstream when it attempted to load one of your web pages. Put simply, your web servers aren’t communicating with each other fast enough. Since a 504 Gateway Timeout Error is rather generic, it doesn’t actually pinpoint the exact cause of the issue. When this happens, your website will serve an error web page to your site’s visitors.

Here's how a 504 Gateway Timeout Error might appear in your user's browser:

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (4)Image Source

504 Errors Wording

The screenshot above depicts how a 504 Gateway Timeout Error appears in one server. Below are some other common ways a 504 error might appear, depending on the server, operating system, or browser you're using.

  • In Google Chrome, a 504 error will appear as HTTP ERROR 504. This code will appear below a message that reads something like: “This site can’t be reached. _____ took too long to respond.”

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (5)

Image Source

  • In Windows-based programs, a 504 error will appear as ERROR 504, HTTP_STATUS_GATEWAY_TIMEOUT, or “The request was timed out waiting for a gateway message.” Here's how it may appear when using Excel:

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (6)

Image Source

  • During a Windows Update, a Gateway Timeout Error generates a 0x80244023 error code. The message will be: WU_E_PT_HTTP_STATUS_GATEWAY_TIMEOUT.

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (7)

Image Source

  • In other operating systems, web servers, or browsers, a 504 error may also result in the following message — although it’s less common: “The proxy server did not receive a timely response from the upstream server.” Here's a slight variation:

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (8)

Image Source

So now we know how the 504 error is worded — but what does it mean exactly? Let's decode it below.

What does 504 gateway timeout mean?

When visiting a website, your server sends a request to another server where that site is hosted. This server — known as the "upstream server" — receives the request and responds with whatever resources are needed to load the website on your browser.

However, a 504 Gateway Timeout error means that your server didn't receive a quick enough response from the upstream server. Because its request timed out, your server is unable to load the web page and, ultimately, fulfill its role as a gateway — hence the name "Gateway Timeout" error.

You might be wondering what exactly causes the delay in the upstream server's response — and that's a good question. Let's address it below.

504 Gateway Timeout Causes

504 Gateway Timeout Errors are among the most frustrating HTTP status codes you can receive. They indicate what happened to your website, but they don’t tell you why it happened, making it challenging for you to pinpoint its cause and ultimately correct the issue.

Below are a few possibilities.

Server Connectivity Issues

Most websites live on multiple servers or third-party hosting providers. If your server is down for maintenance or any other reason, your website could serve visitors a 504 Gateway Timeout Error page.

DNS Changes

If you’ve recently changed servers or moved your website to a different IP address, it’ll make changes to your website’s DNS server. This could cause your website to serve its visitors a 504 Gateway Timeout Error page. Your website won’t be up and running until these DNS changes take full effect, which can take a few hours.

Faulty Firewall Configurations

Your firewall is your website’s gatekeeper, protecting your site from malicious visitors or distributed denial-of-service (DDoS) attacks. Sometimes, a faulty firewall configuration will cause your firewall to deem requests from a content delivery network as an attack on your server and reject them, resulting in a 504 Gateway Timeout Error.

Errors in Your Website's Code

If there’s a mistake in your website’s code, your server might not be able to correctly answer requests from a content delivery network.

Network Connectivity Errors

Since a 504 error is the result of a timeout during the processing of a request between servers, the problem likely lies with them — not the user's internet connection or device. However, if only one user reports seeing a 504 error on your site, it could have to do with their modem, router, or another device. or their internet connection.

Since there are multiple reasons why a 504 error might occur, it will ultimately be up to you to rule each one out until you find the true cause. Fortunately, there are five common and effective solutions for fixing most 504 Gateway Timeout Errors’ causes.

How to Fix 504 Gateway Timeout Errors

  1. Look for server connectivity issues.
  2. Check for any DNS changes.
  3. Sift through your logs.
  4. Fix faulty firewall configurations.
  5. Comb through your website’s code to find bugs.
  6. Contact your hosting provider.

1. Look for server connectivity issues.

If your server is down for maintenance or any other reason, then your website will likely serve visitors a 504 Gateway Timeout Error page. The only way to troubleshoot this issue is to wait for your server to finish maintenance or fix the problem causing the error.

We're committed to your privacy. HubSpot uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (9)

Free Kit: How to Run an SEO Audit

Use this kit to start running a better website.

  • SEO Template
  • Audit Checklist
  • Introductory Guide
  • And more!

Loading your download form

You're all set!

Click this link to access this resource at any time.

Access now

Learn more

2. Check for any DNS changes.

If you’ve recently changed hosting providers or moved your website to a different IP address, then your website’s DNS server will need to be updated. These DNS changes take a few hours to process so in the meantime your website might serve visitors a 504 Gateway Timeout Error page. The only solution is to sit tight while these DNS changes take effect.

3. Sift through your logs.

If the problem is not your server's connection or DNS information, then check out your server logs. These logs provide details about your server’s health and status. Sifting through them may uncover other issues that could be causing a 504 error.

4. Fix faulty firewall configurations.

A faulty firewall configuration may be the reason behind your 504 Gateway Timeout Error. To rule it out as the cause, you can temporarily deactivate your firewall.

If your device runs on Windows, then navigate to your control panel and click Update & Security > Windows Security > Virus & Threat Protection > Manage Settings. On this settings page, you can deactivate your firewall.

If your device runs on Mac OS, then simply navigate to System Preferences > Security & Privacy > Firewall to deactivate it.

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (10)

Once you’ve deactivated your firewall, check to see if the 504 error is resolved. If it is, you can either reconfigure the settings of your existing antivirus program or switch to a new one.

If the error is not resolved, don’t forget to reactivate your firewall before moving onto the next step.

5. Comb through your website’s code to find bugs.

Comb through your code to find any bugs or copy your code into a development machine. It’ll perform a thorough debug process that will simulate the situation in which your 504 Gateway Timeout Error occurred and allow you to see the exact moment where things went wrong.

6. Contact your hosting provider.

Contacting your hosting provider should be a last resort. But if you’ve tried the steps above and are still seeing the 504 Gateway Timeout error, they may be able to solve the issue or provide valuable insight.

How 504 Gateway Timeout Errors Affect SEO

Fixing a 504 Gateway Timeout Error can take time — but it's well worth the effort considering how it can impact your site's technical SEO.

Like an HTTP 500 Internal Server Error, 503 error, or any other 5xx error, a 504 Gateway Timeout error prevents your website from loading. This not only hurts the user experience — it also hurts your SEO performance.

If a web crawler attempts to crawl one of your pages and is served a 504 error, then it can't crawl the page. If that page has already been indexed, then it might be lowered in the search engine results. Or it might be deindexed if the error persists.

Resolving the 504 Gateway Timeout Error

There’s no foolproof way to prevent 504 Gateway Timeout Errors on your site, but there are steps you can take to resolve them. By fixing this error as quickly as possible, you’ll ensure that visitors continue to have seamless experiences on your site and mitigate any negative impacts on your SEO.

Editor's note: This post was originally published in January 2019 and has been updated for comprehensiveness.

Topics: Technical SEO

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors (2024)

FAQs

The Quick & Easy Guide to Fixing 504 Gateway Timeout Errors? ›

The 504 Gateway error is usually temporary, and different reasons may cause it. Most often than not, the problem is due to a client-end issue like Internet connection troubles. However, the hitch may be due to server-to-server network connectivity issues or a server being down.

How to solve 504 gateway time out? ›

How to Fix 504 Gateway Timeout Error
  1. Refresh the Page. Refreshing the web page is often the first and simplest step in resolving a 504 Gateway Timeout error. ...
  2. Try a Different Browser. ...
  3. Check the Proxy Server Settings. ...
  4. Disable Your Firewall. ...
  5. Flush DNS. ...
  6. Check Your Website's Error Log. ...
  7. Check Your Website's Plugins. ...
  8. Disable the CDN.
Apr 1, 2024

Will 504 gateway timeout fix itself? ›

The 504 Gateway error is usually temporary, and different reasons may cause it. Most often than not, the problem is due to a client-end issue like Internet connection troubles. However, the hitch may be due to server-to-server network connectivity issues or a server being down.

What does 504 gateway timeout mean on my computer? ›

A 504 Gateway Timeout error indicates that the web server is waiting too long to respond from another server and “timing out.” There can be many reasons for this timeout: the other server is not functioning properly, overloaded, or down.

What is error code 504 target in maintenance? ›

Pantheon 504 Target in Maintenance

The web site you were looking for is currently undergoing maintenance. This is not a web application (WordPress or Drupal) maintenance mode error. This is a manually toggled emergency message reserved for unusual circ*mstances when a site is known to be unavailable.

What is a 504 gateway timeout 10 seconds? ›

504 Gateway Timeout means that the ALB couldn't reach the backend, this is also quoted here: "The load balancer failed to establish a connection to the target before the connection timeout expired (10 seconds)." Raising the timeout (which is an idle connection timeout) has no effect.

What is the difference between request timeout and gateway timeout? ›

The 504 Gateway Timeout status code indicates that the server acting as a gateway or proxy could not receive a response from an upstream server within a specified time. On the other hand, the 408 Request Timeout status code indicates that the client did not send a complete request to the server within a specified time.

What is the difference between 502 and 504 gateway timeout? ›

A 502 bad gateway means that the server acting as the gateway received an invalid response from the main server. A 504 gateway timeout means that the server acting as the gateway didn't receive a response at all from the main server.

How to avoid 504 gateway timeout spring boot? ›

How to Fix the 504 Gateway Timeout Error
  1. Refresh the Page. You can resolve the 504 issue by reloading the page. ...
  2. Check Other Websites. ...
  3. Clear Browser Cache. ...
  4. Restart Your Computer and Network Devices. ...
  5. Flush DNS. ...
  6. Check Plugins and Themes. ...
  7. Disable Your Firewall. ...
  8. Check Error Log.
Mar 13, 2024

How to fix 504 gateway timeout error in nginx? ›

504 Gateway Timeout: What it is and How to Fix it
  1. Refresh the Page.
  2. Check Proxy Settings.
  3. Restart Router.
  4. Contact Website Admin.
  5. Check Resource Usage.
  6. Change PHP Execution Time.
  7. Configure DNS Settings.
  8. Check the Error Log.
Jun 28, 2023

How to avoid 504 gateway timeout Java? ›

How to Fix the 504 Gateway Timeout Error
  1. Step 1: Retry the web page by selecting the refresh/reload button, pressing F5, or trying the URL from the address bar again.
  2. Step 2: Restart all of your network devices. ...
  3. Step 3: Check the proxy server settings in your browser or application and make sure they're correct.

What does timeout error mean? ›

The error connection timed out means that your browser could not establish a connection to the website's server in time. The problem may be your internet connection, website server, browser, or firewall settings. Generally, a browser needs about 30 seconds to reach a website's server.

What is the error code for timeout? ›

The 408 Request Timeout error is an HTTP status code that means the request you sent to the website server—e.g., a request to load a web page—took longer than the website's server was prepared to wait. In other words, your connection with the website "timed out."

How to fix 502 bad gateway? ›

Check out these common ways to fix the 502 bad gateway error to get back up and running.
  1. Try Reloading the Page.
  2. Check the Site Status.
  3. Try a Different Browser.
  4. Try in Incognito Mode.
  5. Test on Another Device.
  6. Clear Your Browser Cache.
  7. Check for DNS Issues.
  8. Check With Your Host.
Apr 2, 2024

Why do I keep getting a bad gateway on Ticketmaster? ›

What causes a 502 Bad Gateway error? Server overload: An overloaded server is one of the most common causes of a 502 error. This is where the server has reached its memory capacity, often activated by an unusually high number of visitors trying to access the same website.

What is AWS 504 Gateway Time Out error? ›

Short description. A HTTP 504 error is a HTTP status code that indicates a gateway or proxy has timed out. Application Load Balancer HTTP 504 errors can occur if: The load balancer failed to establish a connection to the target before the connection timeout expired (10 seconds).

How to avoid 504 gateway timeout in Java? ›

How to Fix the 504 Gateway Timeout Error
  1. Refresh the Page. You can resolve the 504 issue by reloading the page. ...
  2. Check Other Websites. ...
  3. Clear Browser Cache. ...
  4. Restart Your Computer and Network Devices. ...
  5. Flush DNS. ...
  6. Check Plugins and Themes. ...
  7. Disable Your Firewall. ...
  8. Check Error Log.
Mar 13, 2024

Why does a website say bad gateway? ›

A 502 bad gateway error is an HTTP status code that indicates a communication error between two web servers. You can receive this error when visiting a website that gets an invalid response from its host server or experiences other issues, such as server overloads, network problems, and configuration issues.

References

Top Articles
Latest Posts
Article information

Author: Pres. Carey Rath

Last Updated:

Views: 5966

Rating: 4 / 5 (41 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Pres. Carey Rath

Birthday: 1997-03-06

Address: 14955 Ledner Trail, East Rodrickfort, NE 85127-8369

Phone: +18682428114917

Job: National Technology Representative

Hobby: Sand art, Drama, Web surfing, Cycling, Brazilian jiu-jitsu, Leather crafting, Creative writing

Introduction: My name is Pres. Carey Rath, I am a faithful, funny, vast, joyous, lively, brave, glamorous person who loves writing and wants to share my knowledge and understanding with you.