538 Request Loop

The HTTP 538 Request Loop status code is an unofficial server error specific to Edgio (formerly Layer0), returned when a request passes through too many Edgio servers, indicating a routing loop.

Usage

Edgio routes requests through multiple POP (point of presence) components: edge POPs, global POPs, and serverless workers. Each component forwards the request to the next in the chain. When a request cycles back through a component already visited, the platform detects the loop and terminates the request with 538.

Routing loops occur when:

  • The origin server points back to the Edgio edge, creating a circular path.
  • A CNAME record for the origin hostname resolves to the Edgio edge domain instead of the actual origin IP.
  • EdgeJS routing rules redirect or proxy the request back to the same Edgio-served domain.
  • Multiple CDN layers are chained and one forwards traffic back into Edgio.

Without loop detection, the request cycles indefinitely, consuming resources at every hop. The 538 response breaks the cycle after the platform reaches its internal hop limit.

SEO impact

Search engines treat 538 responses as server errors. Persistent errors cause crawlers to reduce crawl frequency and eventually drop affected URLs from the index.

Example

A client requests a resource through Edgio, but the origin is misconfigured to route back through the Edgio edge, triggering a loop.

Request

GET /api/data HTTP/1.1
Host: www.example.re
Accept: application/json

Response

HTTP/1.1 538 Request Loop
Content-Type: text/html
x-0-status: eh=538

<html>
<head>
<title>538 Request Loop</title>
</head>
<body>
<h1>538 Request Loop</h1>
<p>The request went through too many servers.</p>
</body>
</html>

How to fix

Check the origin hostname in the Edgio project configuration. The origin must resolve to the actual backend server, not to the Edgio edge domain. Run dig against the origin hostname and confirm the resolved IP belongs to the backend infrastructure, not to Edgio.

dig origin.example.re

Review CNAME records. A CNAME chain pointing back to *.edgio.link or *.layer0.link creates a loop. Replace the CNAME with an A record pointing directly to the origin IP.

Inspect EdgeJS routing rules for any proxy() or serveStatic() calls forwarding requests to the same Edgio-served hostname. Routing rules intended for the origin must target the origin hostname, not the edge hostname.

When using multiple CDN layers in front of Edgio, verify the upstream CDN forwards to the correct Edgio origin shield, and the Edgio project forwards to the true backend. Each layer in the chain must advance the request toward the origin, never backward.

Review the x-0-status header in the error response to trace the path the request took before the loop was detected.

Takeaway

The 538 Request Loop status code is an unofficial server error specific to Edgio, returned when a routing misconfiguration causes a request to cycle through Edgio servers repeatedly. Fixing the origin hostname or CNAME records to point to the actual backend resolves the loop.

See also

Last updated: March 6, 2026