More
More
408 Request Timeout
The server gave up waiting for the client to finish sending the request.
- Code
408- Reason phrase
- Request Timeout
- Class
- 4xx Client error
- Defined in
- RFC 9110 section 15.5.9
- Cacheable by default
- No
What it means
Client error: the problem lies with the request. Repeating it unchanged will normally fail again.
When a server should send it. When the client opened a connection but did not finish sending the request in time. Servers send it as they close idle connections, and should add Connection: close.
Common causes. A slow or dropped connection, or a browser keeping an idle connection open too long.
What to do. Retry. Persistent timeouts point to the network or an upload that is too slow.
How clients and crawlers treat it
Browsers and HTTP clients. Browsers that receive it on an idle keep-alive connection retry the request on a new connection automatically, so users rarely see it.
Google Search. Like every 4xx except 429, it tells Google the content does not exist: an indexed URL is removed from the index, and a new one is not processed. Crawl frequency for the URL gradually drops. Source: Google Search Central, How HTTP status codes, and network and DNS errors affect Google Search.
Caching. Not cacheable by default (RFC 9110 section 15.1 does not list it). A cache stores it only when the response says so with Cache-Control or Expires.
Example response
HTTP/1.1 408 Request Timeout Connection: close Request Timeout
How to send 408
location /example {
return 408;
}
RewriteEngine On RewriteRule ^example$ - [R=408,L]
http_response_code(408); echo 'Request Timeout'; exit;
res.writeHead(408, { 'Content-Type': 'text/plain' });
res.end('Request Timeout');
# in a view function return 'Request Timeout', 408
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 504Gateway TimeoutA proxy or CDN waited too long for the server behind it.
- 429Too Many RequestsThe client sent too many requests in a given time and is being rate limited.
- 400Bad RequestThe server could not understand the request.
All status codes · All 4xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.