The HTTP status code 504 Gateway Timeout means a server acting as a gateway or proxy did not receive a timely response from the upstream server it needed to complete the request (RFC 9110).
At a glance
- Status code
- 504
- Class
- 5xx (server error)
- Duration
- not specified
- In Google
- not named separately; for 5xx errors crawling slows down temporarily
- Specification
- RFC 9110, section 15.6.5
Last checked:
How does 504 differ from 502?
With 502 Bad Gateway, the gateway received a response but it was invalid. With 504, no HTTP response arrived within the timeout (MDN). The upstream server may be overloaded, stuck or unreachable.
Hosting guides often name slow database queries, long-running scripts, overloaded servers, firewall rules or timeouts set too tightly between proxy and application. MDN adds that client networking problems such as VPNs, firewalls, DNS or proxy settings can also play a role. The error message varies by server and CDN, for example “504 Gateway Time-out” from nginx or “HTTP Error 504”.
What does 504 mean for SEO?
Google’s documentation states that 5xx and 429 errors make its crawlers slow down temporarily and that Google lowers the crawl rate for the site. It names 500, 502 and 503 as examples, and 504 belongs to the same 5xx class. Already indexed URLs stay in the index at first, but URLs that persistently return a server error are eventually removed. Google gives no time frame.
Slow pages that run into timeouts matter most on large sites, where many URLs are requested in a short time. Server logs and the crawl stats report in Search Console show how often crawlers received 504 responses.
| Status code | Meaning per RFC | How Googlebot reacts | Effect on the index | Retry-After |
|---|---|---|---|---|
| 429 Too Many Requests | too many requests in a given amount of time (rate limiting, RFC 6585) | treated as a sign of an overloaded server and as a server error; crawling temporarily slows down | indexed URLs are kept for now; if Googlebot sees the code on the same URL for multiple days, it may be dropped | RFC: may be included; Google: tells crawlers when they can retry |
| 500 Internal Server Error | unexpected condition on the server | the site's crawl rate drops in proportion to the number of URLs returning a server error | indexed URLs are kept for now; persistent errors get them removed, possibly after multiple days on the same URL | Google only describes it for 503 and 429 |
| 502 Bad Gateway | a gateway or proxy got an invalid response from the server behind it | same as 500 | indexed URLs are kept for now and removed if the error persists | Google only describes it for 503 and 429 |
| 503 Service Unavailable | temporarily unavailable, for example due to overload or maintenance | same as 500 | indexed URLs are kept for now; if Googlebot sees the code on the same URL for multiple days, it may be dropped | RFC: may be included and states the expected downtime; Google: tells crawlers when they can retry (seconds or a date) |
| 504 Gateway Timeout (this term) | a gateway or proxy didn't get a timely response from the server behind it | not listed individually by Google; for all 5xx codes, crawling temporarily slows down | indexed URLs are kept for now but eventually dropped (statement for all 5xx) | Google only describes it for 503 and 429 |
Google ignores any content it receives with a 5xx response. Once the server responds with 2xx again, Google gradually increases the crawl rate. To deliberately reduce crawling for a short time (a few hours up to 1-2 days), Google names 500, 503 or 429 and advises against doing so for longer. Google treats network timeouts, connection resets and DNS errors similarly to 5xx errors; according to Google, unreachable URLs are removed from the index within days. Sources: Google Crawling Infrastructure: How HTTP status codes affect Google's crawlers (last updated 2026-02-04); Google Crawling Infrastructure: Reduce the Google crawl rate (last updated 2026-10-06); Google Crawling Infrastructure: Debug network and DNS errors (last updated 2025-12-18); RFC 9110: HTTP Semantics, 15.6 Server Error 5xx and 10.2.3 Retry-After; RFC 6585: Additional HTTP Status Codes, 4. 429 Too Many Requests. Last checked: .
Example
HTTP/1.1 504 Gateway Timeout
Content-Type: text/html
<h1>Gateway timeout</h1>
<p>The server did not respond in time.</p>
Common mistakes
- Persistent timeouts on many URLs. For server errors, Google says crawling slows down and URLs that persistently return an error are removed from the index.
- Only raising the timeout. This moves the limit but does not speed up the slow request (practical experience). The cause is usually the application or database behind the proxy.
FAQ
Is a 504 error my fault? As a visitor, rarely. The delay happens between servers. Only local VPN, proxy or DNS settings can cause it on your side.
How do I fix a 504 as a site owner? Find out which upstream service answers too slowly, using the proxy’s error log and the application’s logs. Raising the proxy timeout hides the symptom but does not make the backend faster.
Sources
- RFC 9110: HTTP Semantics, 15.6.5 504 Gateway Timeout – IETFrfc-editor.org
- 504 Gateway Timeout – MDN Web Docsdeveloper.mozilla.org
- How HTTP status codes affect Google's crawlers – Google Crawling Infrastructuredevelopers.google.com
Last updated: