Skip to content
Control Plane Labs

463 Too Many Forwarded IPs (AWS ALB)

Client error response defined by docs.aws.amazon.com.

Written and maintained by Ben Ennis

Last reviewed November 9, 2026 · How we verify this

Common causes at a glance

  • A request loop between proxies, each one appending an address
  • A long chain of CDNs, WAFs, and internal proxies
  • Clients or bots sending a forged X-Forwarded-For header
  • Two ALBs or ingress layers routing traffic back to each other

Reproduce it

curl -i -H "X-Forwarded-For: $(seq -s, 1 31 | sed 's/[0-9]*/10.0.0.&/g')" https://app.example.com/

What 463 Too Many Forwarded IPs (AWS ALB) means

Every proxy in front of the ALB can append the address it received the request from to X-Forwarded-For. In the default append mode, the ALB adds the client’s address too. When the incoming header already holds more than 30 addresses, the ALB rejects the request with 463 instead of forwarding it. The request never reaches a target. Compare 431, the registered code for headers that are too large.

There is no RFC

AWS documents 463 and the 30-address limit in its ALB troubleshooting guide. How the ALB treats the header is set by the routing.http.xff_header_processing.mode attribute, described on the X-Forwarded headers page: append (the default) adds the client IP, preserve passes the header through unchanged, and remove strips it. AWS warns that entries are only trustworthy when added by systems you control. The standardized alternative, the Forwarded header, is defined in RFC 7239.

What actually causes it

A loop is the usual culprit. If a target or sidecar proxies requests back through the same load balancer, every pass adds an address until the header crosses 30. That shows up as bursts of 463 on one path, often with identical addresses repeated in the header. Legitimate chains rarely come close to 30 hops. A steady trickle from many clients points at forged headers, which you can stop by having your edge replace the header rather than append to it.

How to debug it

Log the header at the hop in front of the ALB and count its entries. A repeated address means a loop:

echo "$XFF" | tr ',' '\n' | sort | uniq -c | sort -rn | head

Break the loop, or set your outermost trusted proxy to overwrite the header.

Working examples

curl

# Send 31 addresses; expect HTTP/1.1 463 from the ALB.
XFF=$(seq -s, 1 31 | sed 's/[0-9]*/10.0.0.&/g')
curl -si -H "X-Forwarded-For: $XFF" https://app.example.com/ | head -1

# Inspect the load balancer's processing mode.
aws elbv2 describe-load-balancer-attributes --load-balancer-arn "$ALB_ARN" \
  --query "Attributes[?Key=='routing.http.xff_header_processing.mode']"

Python (requests)

import requests

xff = ", ".join(f"10.0.0.{i}" for i in range(1, 32))
r = requests.get("https://app.example.com/", headers={"X-Forwarded-For": xff}, timeout=10)
print(r.status_code)  # 463 when more than 30 addresses arrive

Node (fetch)

const xff = Array.from({ length: 31 }, (_, i) => `10.0.0.${i + 1}`).join(", ");
const res = await fetch("https://app.example.com/", {
  headers: { "X-Forwarded-For": xff },
});
console.log(res.status); // 463 when the header lists more than 30 IPs

Reference and tooling

The authoritative list of assigned status codes is theIANA HTTP Status Code Registry. For a searchable copy with the semantics summarised, use theHTTP status code reference on this site. To see exactly what a server is sending, theheader inspector shows the raw status line and response headers, and thecurl builder assembles the request flags for you.

Other 4xx codes