504 Gateway Timeout
A gateway server did not receive a timely response from the upstream server.
What it means
HTTP 504 Gateway Timeout means a proxy or gateway server did not get a response from the upstream server in time. Unlike 502, where the upstream replied with something invalid, here the upstream simply did not respond before the timeout.
When it happens
It happens with slow backend processing, an overloaded origin, long-running database queries, or upstream timeouts set too aggressively at the proxy or load balancer.
How to fix it
- Investigate slow backend operations and optimize long-running queries.
- Increase upstream timeout settings on the gateway or load balancer if work is legitimately slow.
- Scale or add caching to reduce backend load.
- Check the health and capacity of the origin server.
SEO impact
Damaging if sustained. Timeouts prevent indexing and, when repeated, slow your crawl rate and risk ranking loss. Keep server response times well within gateway timeouts.
Find out which of your URLs return 504
Paste a list of URLs and Sitewell checks the status code of every one at once — free and without signup.
Related codes
A server acting as a gateway received an invalid response from the upstream server.
503 Service UnavailableThe server is temporarily unable to handle the request, often due to overload or maintenance.
500 Internal Server ErrorA generic error meaning the server encountered an unexpected condition.
501 Not ImplementedThe server does not support the functionality required to fulfil the request.
505 HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request.
506 Variant Also NegotiatesA server misconfiguration in content negotiation causes an internal negotiation loop.
Related guides
A plain-English primer on HTTP status codes for SEOs: what the 2xx, 3xx, 4xx, and 5xx families mean, which ones affect rankings, and the codes worth knowing.
How to find and fix broken linksA practical walkthrough for finding broken links on your site, working out why each one breaks, and fixing them so visitors and crawlers stop hitting dead ends.