Free auditStart free
GuideError · HTTP status codes

508 Loop Detected

A 508 means the server stopped an operation because it found an infinite loop. See the WebDAV Depth: infinity case, the Vercel error, and how to fix each.

4 min
read
6
sources
Oct 30, 2026
updated
Scaplet Editorial Team
author
The short answer

A 508 Loop Detected means the server ended an operation because it hit an infinite loop. In WebDAV (RFC 5842) it answers a PROPFIND with Depth: infinity that walks a collection containing a binding loop. On Vercel the same status is INFINITE_LOOP_DETECTED, raised when an app keeps requesting itself. Fix the loop, or request a finite depth.

  1. What 508 means, and the two places you meet it
  2. WebDAV: the Depth: infinity case
  3. Vercel: INFINITE_LOOP_DETECTED
  4. What a 508 does to SEO
30-second check

Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
RFC 5842 (WebDAV Binding Extensions), section 7.2
Defined in
5xx server error
Class
INFINITE_LOOP_DETECTED (508)
Vercel error code
DavDepthInfinity off
Apache mod_dav default
02How it works

WebDAV: the Depth: infinity case

A PROPFIND request must carry a Depth header of 0, 1 or infinity (RFC 4918). With infinity the server walks every member of a collection. If bindings make the collection contain itself, that walk never ends. RFC 5842 describes two outcomes: a client that signalled bind support through the DAV request header can get 208 Already Reported inside a multistatus body, and a non-bind-aware client gets the whole request rejected with a 508.
Send the PROPFIND from RFC 5842's example with curl
curl -i -X PROPFIND https://dav.example.com/Coll/ \
  -H "Depth: infinity" \
  -H "Content-Type: application/xml; charset=utf-8" \
  --data '<?xml version="1.0" encoding="utf-8" ?>
<D:propfind xmlns:D="DAV:">
  <D:prop> <D:displayname/> </D:prop>
</D:propfind>'

# A loop on a non-bind-aware client:
# HTTP/1.1 508 Loop Detected

# Same request with a finite depth, which avoids the walk:
#   -H "Depth: 1"

Many servers refuse infinite depth outright. RFC 4918 says support for infinite-depth requests MAY be disabled because of performance and security concerns, and that a server MAY reject PROPFIND on collections with Depth: infinity using a 403 with the propfind-finite-depth precondition in the error body. Apache's mod_dav disallows them by default: DavDepthInfinity is off, because such a request could constitute a denial-of-service attack.

Apache mod_dav: infinite-depth PROPFIND is off unless you enable it
<Location "/dav">
    Dav On
    # Default is off. Turning it on lets one request walk the whole tree.
    # DavDepthInfinity on
</Location>
  1. 01

    Check the Depth header the client sends

    A request with no Depth header should be treated like Depth: infinity, per RFC 4918, so set an explicit finite depth in sync tools and scripts.

  2. 02

    Look for bindings that cycle

    On a server that supports bindings, find a collection with a binding to one of its own ancestors and remove or retarget it.

  3. 03

    Send the `DAV` header from bind-aware clients

    RFC 5842 says 208 should not be used unless the client has signalled support with the DAV request header, which is why other clients get the 508.

03Worth knowing

Vercel: INFINITE_LOOP_DETECTED

Vercel's error page for INFINITE_LOOP_DETECTED (HTTP 508, "Loop Detected") says the error occurs when an infinite loop is detected within the application, for example when the app makes an infinite number of requests to itself or to an external API or database. Its troubleshooting steps are the checklist to follow.

Application source

look for code that can loop, such as a looping fetch or an unconditional redirect.

Configuration

review files such as next.config.js and vercel.json to make sure they are not causing the loop.

External calls

confirm that API or database calls your app makes do not have errors or loops.

Logs

check the application logs for unhandled exceptions that might cause the loop.

Status page

if nothing above explains it, check Vercel's status page for CDN outages, which Vercel says can sometimes cause this error.

A route that requests itself (the pattern Vercel describes), and a guard
// Loops: this handler calls its own URL, which runs the same handler.
export async function GET(request) {
  const res = await fetch(new URL(request.url)); // never terminates
  return res;
}

// Guard: refuse to recurse if the request already came from this route.
export async function GET(request) {
  if (request.headers.get('x-internal-hop')) {
    return new Response('Loop refused', { status: 400 });
  }
  const res = await fetch('https://api.example.com/data', {
    headers: { 'x-internal-hop': '1' },
  });
  return res;
}
04Explained

What a 508 does to SEO

Crawlers do not send PROPFIND, so a WebDAV 508 is invisible to search. A 508 on a page route (for example from a Vercel app) is a 5xx: Google says 5xx errors make crawlers temporarily slow down, indexed URLs are preserved but eventually dropped, and content from a 5xx response is ignored. Google's guide does not list 508 on its own, so it applies the class behavior. See 5xx server errors and 502 Bad Gateway for a more common gateway failure.
Questions

Asked a lot.

4 questions people ask next, answered from the sources on this page.

01What does 508 Loop Detected mean?

The server stopped an operation because it found an infinite loop. In WebDAV it is returned for a request with Depth: infinity that hits a binding loop. Vercel uses 508 for INFINITE_LOOP_DETECTED when an app keeps requesting itself.

02How do I fix a 508 on Vercel?

Follow Vercel's troubleshooting list: check the source for looping fetches or unconditional redirects, review next.config.js and vercel.json, confirm external API and database calls are not looping, read the logs for unhandled exceptions, and check Vercel's status page.

03What is the difference between 208 and 508?

RFC 5842 uses 208 Already Reported inside a multistatus body for clients that support bindings, to avoid listing a collection twice. For clients that do not, the whole request is rejected with 508.

04Is 508 a redirect loop?

No. A redirect loop shows up in the browser as ERR_TOO_MANY_REDIRECTS after repeated 3xx responses. A 508 is a status the server sends when it detects a loop itself.

Sources · 6

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • rfc-editor.org
  • mozilla.org
  • vercel.com
  • apache.org
  • google.com
  1. 01RFC 5842: Binding Extensions to WebDAVrfc-editor.org · checked 2026-11-01
  2. 02RFC 4918: HTTP Extensions for WebDAVrfc-editor.org · checked 2026-11-01
  3. 03MDN: 508 Loop Detecteddeveloper.mozilla.org · checked 2026-11-01
  4. 04Vercel docs: INFINITE_LOOP_DETECTEDvercel.com · checked 2026-11-01
  5. 05Apache httpd: mod_dav (DavDepthInfinity)httpd.apache.org · checked 2026-11-01
  6. 06How HTTP status codes affect Google's crawlersdevelopers.google.com · checked 2026-11-01
Free · 2 minutes

Tools point. Agencies advise. This one ships.

Run the free audit, then approve the fixes. Every change can be undone.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • 0→7 ChatGPT citations in six weeks Paylane