What is a Max-Forwards header?
Limits how many times a TRACE or OPTIONS request may be forwarded by proxies.
Max-Forwards is a diagnostic tool for TRACE and OPTIONS requests, letting you decrement a counter at each proxy hop to figure out exactly how many intermediaries sit between a client and a website's origin server. It's mostly used for debugging a chain of proxies or load balancers rather than something day-to-day monitoring needs to touch.
Common use case
A network engineer sends a TRACE request with Max-Forwards: 3 to see exactly what the request looks like after passing through the third proxy hop, similar in spirit to a traceroute.
Example
Max-Forwards: 5History
Part of the original HTTP/1.1 specification, RFC 2068 (1997).
Did you know?
It only applies to TRACE and OPTIONS - it has no effect on GET, POST, or any other method, which is a common point of confusion for developers encountering it for the first time.