← Back to headers
HTTP Header
Forwarded
RequestExposes original client connection information that is altered or lost when a proxy is involved.
HTTP header reference, syntax, examples, and developer usage.
What is the Forwarded header?
The Forwarded HTTP header is used to transmit metadata between a client and server as part of HTTP requests or responses.
HTTP headers define how content should be interpreted, cached, authenticated, secured, or processed by browsers and APIs.
Direction
This is a request header sent by the client to the server.
Syntax
Forwarded: for=<client>; by=<proxy>; host=<host>; proto=<protocol>
Example
Forwarded: for=192.0.2.60; proto=https; by=203.0.113.43; host=example.com
Common use cases
- Preserving original client IP through reverse proxies
- Forwarding the original protocol (HTTP vs HTTPS) behind a load balancer
- Standardized alternative to X-Forwarded-For
Common mistakes
- Using the header in the wrong request or response context
- Sending invalid header values
- Incorrect header syntax
- Assuming the header automatically changes server behaviour
Practical developer insight
Forwarded is the RFC 7239 standard replacement for the X-Forwarded-* family of headers. It combines for, by, host, and proto into a single structured header. Despite being the standard, X-Forwarded-For remains more widely used in practice — always validate and sanitize either header before trusting client IP values.