More
More
508 Loop Detected
The server found an infinite loop while processing a WebDAV request.
- Code
508- Reason phrase
- Loop Detected
- Class
- 5xx Server error
- Defined in
- RFC 5842 section 7.2
- Cacheable by default
- No
What it means
Server error: the request may be fine, but the server failed to carry it out.
Common causes. Bindings that refer back to themselves.
What to do. Fix the loop in the WebDAV structure.
How clients and crawlers treat it
Google Search. Googlebot treats 5xx responses as a sign of trouble and temporarily slows its crawl rate. Already indexed URLs are kept at first, but are dropped if the errors continue. 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 508 Loop Detected Content-Type: text/plain; charset=utf-8 Loop Detected
How to send 508
location /example {
return 508;
}
RewriteEngine On RewriteRule ^example$ - [R=508,L]
http_response_code(508); echo 'Loop Detected'; exit;
res.writeHead(508, { 'Content-Type': 'text/plain' });
res.end('Loop Detected');
# in a view function return 'Loop Detected', 508
Change the paths to suit. In nginx, add_header needs always to apply to error responses.
Related codes
- 507Insufficient StorageThe server has no space left to store what the request needs.
- 506Variant Also NegotiatesThe server's content negotiation is misconfigured and loops.
- 510Not ExtendedThe request needs an HTTP extension the server does not have. The code is now obsolete.
- 505HTTP Version Not SupportedThe server does not support the HTTP version used in the request.
All status codes · All 5xx codes
Names and numbers from the IANA HTTP Status Code Registry. Google Search behaviour as documented by Google Search Central.