HTTP 504 Gateway Timeout
Returned by a reverse proxy or CDN when an upstream origin server fails to complete an HTTP response before the proxy's timeout window expires.
Verified
Syntax / Example
HTTP/2 504 Gateway Timeout content-type: text/html; charset=utf-8
Verify On A Live URL
curl -s -m 15 -o /dev/null -w "status=%{http_code} ttfb=%{time_starttransfer}s\n" https://example.com/Documented Facts For HTTP 504 Gateway Timeout
| Metric or Rule | Documented Value | Source |
|---|---|---|
| RFC 9110 definition | Upstream server did not respond in time (§15.6.5) | RFC 9110: HTTP SemanticsChecked November 25, 2026 |
| Google Search handling | Throttles crawl rate; de-indexes if persistent | Google: HTTP Status Codes & SearchChecked November 25, 2026 |
| Target healthy TTFB | <= 800 ms (web.dev Good threshold) | Google: Large Site Crawl Budget GuideChecked November 25, 2026 |
Official Specification & Google Behavior
Defined in RFC 9110 §15.6.5. Google classifies 504 with 5xx server errors, lowering your site's crawl capacity limit automatically when latency and timeouts climb.
SEO & Indexing Impact
Slow database-backed pages timing out under crawl bursts cause crawl-budget collapse on large sites and fail user-triggered AI assistant fetches (`ChatGPT-User`, `Claude-User`) that enforce tight timeouts.
Backlink Monitoring Verdict
Indicates severe origin latency rather than intentional deletion—optimize TTFB (<= 800ms) or cache the route statically.
Common Pitfalls
- Running unindexed database joins on faceted category pages that exceed serverless or CDN 10–30 second timeout limits.
- Letting slow dynamic sitemaps return 504 when Googlebot attempts to fetch /sitemap.xml.
Frequently Asked Questions
- Why does HTTP 504 hurt Google crawl budget so quickly?
- Googlebot adjusts crawl capacity dynamically based on server response speed and 5xx rates; 504 timeouts signal server overload and immediately slow crawling.
- How do I prevent 504 timeouts on /sitemap.xml?
- Pre-generate or statically cache /sitemap.xml at build time or CDN edge instead of querying live database tables synchronously per request.
- Why do AI fetchers like ChatGPT-User fail on slow pages even before 504?
- User-triggered AI fetchers operate under tight real-time response budgets to answer users quickly, abandoning pages with multi-second TTFB.
Primary Sources
Verified
- RFC 9110: HTTP SemanticsNovember 25, 2026
- Google: HTTP Status Codes & SearchNovember 25, 2026
- Google: Large Site Crawl Budget GuideNovember 25, 2026
Related Research Guides
- October 9, 20269 HTTP Status Codes That Impact SEO And Backlinks: RFC 9110 VerdictsNine HTTP status codes (200, 301, 302, 308, 403, 404, 410, 429, 503) explained with RFC 9110 rules, Googlebot crawl handling and backlink verdicts.
- November 27, 2026Chrome DevTools And Curl For Technical SEO: 15 Zero-Cost Header, JS And CWV DiagnosticsCatch hidden X-Robots-Tag noindex headers, WAF 403 AI bot blocks, TTFB > 800ms and CSR JS drift in seconds using copy-paste curl and DevTools.
- November 27, 2026Pagination And Faceted Navigation SEO: Self-Canonicals, Crawl Traps And Infinite ScrollGoogle retired rel=prev/next in 2019—requiring self-canonicals on Page 2+ while uncontrolled facets multiply into 48,000+ crawl-trap URLs.