SiteError.comYour friendly guide to HTTP status codes
Status CodesBlog
  1. Home
  2. 5xx Server Error
  3. 508 Loop Detected

508 Loop Detected

🔁
508
Loop Detected
⚙️
⚙️

Example HTTP Response

HTTP Response
HTTP/1.1 508 Loop Detected
Common Causes
  • WebDAV infinite loop in resource binding
  • Circular symbolic links
  • Recursive operation detected
Technical Details

What does this mean?

Groundhog Day! The server caught itself going in circles. This request leads back to itself forever.

Technical Definition

The server detected an infinite loop while processing the request.

RFC Says

"The 508 (Loop Detected) status code indicates that the server terminated an operation because it encountered an infinite loop while processing a request with 'Depth: infinity'. This status indicates that the entire operation failed."

Plain English:

508 means 'I detected an infinite loop while processing your request.' This is from WebDAV and typically happens with recursive operations when there are circular references in the resource tree (like symbolic links that point to parent directories). The server stops processing to prevent hanging.

Common Misinterpretation

This is specific to WebDAV recursive operations with the Depth header. Application developers might use this concept for other graph traversal scenarios where circular references are detected, but it's not a standard use of 508 outside WebDAV.

View RFC Documentation
Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(508).json({
    error: 'Loop Detected',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(508, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Loop Detected',
    message: 'Your error message here'
  }));
}).listen(3000);

508 Loop Detected FAQ

What causes a 508 Loop Detected error?

WebDAV infinite loop in resource binding. Circular symbolic links. Recursive operation detected.

507 Insufficient Storage510 Not Extended

Popular Status Codes

  • 200 OK
  • 301 Moved Permanently
  • 302 Found
  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 502 Bad Gateway
  • 503 Service Unavailable

Compare Codes

  • 401 vs 403
  • 301 vs 302
  • 404 vs 410
  • 500 vs 502
  • Compare any codes →

Categories

  • Informational
  • Success
  • Redirection
  • Client Error
  • Server Error
  • NGINX
  • Cloudflare
  • AWS ELB
  • Microsoft IIS

Tools

  • Cheat Sheet
  • Status Code Quiz
  • URL Checker
  • API Playground
  • Blog

© 2026 SiteError.com. All rights reserved.