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 IPsReference 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.
Related reading
- Every HTTP status code, and when it shows up
The wider map: which codes you actually meet in production, and the pairs everyone confuses.
Other 4xx codes
- 400 Bad Request
- 401 Unauthorized
- 402 Payment Required
- 403 Forbidden
- 404 Not Found
- 405 Method Not Allowed
- 406 Not Acceptable
- 407 Proxy Authentication Required
- 408 Request Timeout
- 409 Conflict
- 410 Gone
- 411 Length Required
- 412 Precondition Failed
- 413 Content Too Large
- 414 URI Too Long
- 415 Unsupported Media Type
- 416 Range Not Satisfiable
- 417 Expectation Failed
- 418 (Unused)
- 419 Page Expired
- 421 Misdirected Request
- 422 Unprocessable Content
- 423 Locked
- 424 Failed Dependency
- 425 Too Early
- 426 Upgrade Required
- 428 Precondition Required
- 429 Too Many Requests
- 430 Shopify Security Rejection
- 431 Request Header Fields Too Large
- 440 Login Time-out (Microsoft)
- 444 No Response
- 449 Retry With (Exchange ActiveSync)
- 451 Unavailable For Legal Reasons
- 460 Client Closed Connection (AWS ALB)
- 464 Incompatible Protocol Version (ALB)
- 494 Request Header Too Large
- 495 SSL Certificate Error
- 496 SSL Certificate Required
- 497 HTTP Request Sent to HTTPS Port
- 498 Invalid Token (Esri ArcGIS)
- 499 Client Closed Request