Reference guide · http-status · Published 2026-08-16 · 3 min read
HTTP 508 Loop Detected explained
HTTP 508 Loop Detected explained: WebDAV request loops, when the code is served, and how to stop the recursion.
- ·What 508 means
- ·When WebDAV returns it
- ·Breaking the loop
What the 508 status code means
HTTP 508 Loop Detected signals that a WebDAV server found an infinite loop while processing a request. The server detects that a request keeps referring back to resources it has already visited during the same transaction, and it stops before the recursion can run forever.
The status was defined in RFC 5842 for the WebDAV binding support and is registered as an additional HTTP status of the 5xx family. Because a genuine 508 is a WebDAV-specific condition, you rarely see it on a plain website front end.
When a WebDAV server returns it
WebDAV lets clients create named bindings, and it is possible for one resource to point back to an earlier resource. A typical loop is a depth-first request such as a PROPFIND with a large Depth header that returns to the same collection through its bindings. The error family treats 508 as a server-side condition, and the server must detect and abort the recursion itself.
HTTP/1.1 508 Loop Detected
Content-Type: text/plain
The server encountered an infinite loop while processing this request.
The request that creates the loop can be a document management tool, a versioning client or a sync client talking to a WebDAV endpoint rather than a normal browser. If you control the client, remove the circular binding or restrict the depth. If you are the server administrator, the goal is to keep bindings acyclic and to cap probing.
Breaking the loop
- Confirm it is a 508. A real 508 comes with a WebDAV error body and appears in the access logs of the DAV endpoint, not the public site.
- Remove the circular binding. Traverse the DAV tree and delete the binding that points back to an ancestor collection.
- Limit probing depth. Set a reasonable
Depth(for example1) in client requests instead of an unlimited recursion. - Cap server traversal. Force the DAV handler to track visited resources per request and to abort after a bounded number of hops.
- Check shared hosting. On managed hosts, a false loop can arise from a misconfigured ACL or an accidental re-mount of a directory; review the hosting panel entry points first.
A 508 must not be confused with an ordinary internal error. The related 500/502/504 set and the status code list help you place 508 correctly, and when the loop is caused by a full disk the disk guidance at server disk full applies.