508 Loop Detected

HTTP response status code 508 is a server error relevant to either WebDAV or cPanel/CloudLinux.

For WebDAV, 508 Loop Detected indicates the server terminated a directory tree request because an infinite loop was detected.

For cPanel hosting environments running CloudLinux, 508 Resource Limit Is Reached indicates the hosting account exceeded one of the allocated resource limits.

Usage specific to WebDAV

The 508 Loop Detected status code occurs when the client submits a WebDAV request for an entire directory and the result creates a target within the same tree. This produces an infinite request/response loop with Depth: Infinity, and the server terminates the entire operation.

Usage specific to cPanel / CloudLinux

The 508 Resource Limit Is Reached status code is generated by shared hosting environments running cPanel with CloudLinux when one of the account's resource limits has been exceeded. Examples of resource limits include CPU usage, physical memory, I/O throughput, and the number of concurrent processes (entry processes).

SEO impact

Search engines treat 508 the same as other 5xx server errors. Persistent failures reduce crawl rate and eventually remove affected URLs from the index.

Example

A WebDAV client requests a recursive directory listing. The server detects a binding loop within the collection hierarchy and terminates the request.

Request

PROPFIND /shared/ HTTP/1.1
Host: www.example.re
Depth: infinity
Content-Type: application/xml

Response

HTTP/1.1 508 Loop Detected
Content-Type: text/html; charset=UTF-8
Content-Length: 174

<html>
  <head>
    <title>Loop Detected</title>
  </head>
  <body>
    <p>The server detected an infinite loop
    while processing the directory tree.</p>
  </body>
</html>

How to fix

For WebDAV (508 Loop Detected):

A PROPFIND with Depth: infinity hit a circular binding, where a collection contains a reference back to a parent or to itself.

  • Inspect the collection hierarchy for bind loops. A symbolic link or WebDAV binding pointing a child collection back to an ancestor creates the cycle. Remove or redirect the circular binding.
  • Avoid Depth: infinity requests when possible. Use Depth: 1 to list one level at a time and traverse the tree iteratively. Most WebDAV clients support this pattern.
  • In server-side code, add loop detection logic tracking visited collection URIs. Terminate traversal when a URI appears twice.
  • Check the server log for the exact URI path where recursion was detected to pinpoint the misconfigured binding.

For cPanel / CloudLinux (508 Resource Limit Is Reached):

The hosting account exceeded a resource limit: CPU, memory, I/O, or entry process count.

  • Log into cPanel and check the "Resource Usage" or "CPU and Concurrent Connection Usage" page to identify which limit was breached.
  • Disable resource-heavy plugins or modules. WordPress sites with poorly optimized plugins frequently hit process and memory limits on shared hosting.
  • Optimize database queries and enable page Caching to reduce per-request resource usage.
  • Check for a traffic spike or DDoS attack driving resource consumption. Enable rate limiting or a CDN to absorb excess traffic before the requests reach the origin.
  • Upgrade the hosting plan to a tier with higher CPU, memory, and process limits if the site has outgrown the current allocation.

Code references

.NET

HttpStatusCode.LoopDetected

Rust

http::StatusCode::LOOP_DETECTED

Rails

:loop_detected

Go

http.StatusLoopDetected

Symfony

Response::HTTP_LOOP_DETECTED

Python3.5+

http.HTTPStatus.LOOP_DETECTED

Apache HttpComponents Core

org.apache.hc.core5.http.HttpStatus.SC_LOOP_DETECTED

Angular

@angular/common/http/HttpStatusCode.LoopDetected

Takeaway

The 508 Loop Detected status code in WebDAV indicates an infinite loop was discovered while processing a directory tree. In cPanel/CloudLinux hosting environments, the 508 Resource Limit Is Reached status code indicates a resource limit was reached on the hosting account.

See also

Last updated: March 6, 2026