devkult_
tools29converters34

508 Loop Detected

5xx server error

The server found an infinite loop while processing the request (WebDAV).

508 (RFC 5842) is raised by WebDAV servers when an operation with Depth: infinity runs into a cycle, such as a folder binding that contains itself.

Shared hosts running CloudLinux also show '508 Resource Limit Is Reached' when an account exceeds its CPU, memory or process limits — a different, non-standard use of the same number, and the one most people actually meet.

Class5xx Server Error
Retry?With backoff (idempotent requests only)
Cacheable by defaultNo — only with explicit Cache-Control
Response bodyAllowed
Defined inRFC 5842 §7.2 — 508 Loop Detected
Example response
HTTP/1.1 508 Loop Detected
Content-Type: application/json
Content-Length: 25

{"error":"Loop Detected"}

Common causes

  • WebDAV bindings forming a cycle.
  • Shared-hosting resource limits being hit (CloudLinux LVE).

How to fix it

  1. Remove the cyclic binding.
  2. On shared hosting, reduce load with caching, find the heavy scripts, or upgrade the plan.

Send a 508 from your server

Express
res.status(508).json({ error: "Loop Detected" });
Next.js route handler
return Response.json({ error: "Loop Detected" }, { status: 508 });
Flask
return {"error": "Loop Detected"}, 508
Go net/http
http.Error(w, "Loop Detected", http.StatusLoopDetected)
nginx
return 508;

Check what a URL returns

Print just the status line from the command line, or check a whole list of URLs at once, with their response headers, in the HTTP Status Checker.

curl -sI https://example.com/your-path | head -n 1

Frequently asked questions

Why does my shared hosting show '508 Resource Limit Is Reached'?

Your account exceeded the host's CPU, memory or process limits. Add caching, find the slow plugins or scripts, or move to a bigger plan.

Related status codes