X-Forwarded-Host header
The HTTPX-Forwarded-Host (XFH)request header is a de-facto standard header for identifying the original host requested by the client in theHost HTTP request header.
Host names and ports of reverseproxies (load balancers, CDNs) may differ from the origin server handling the request, in that case theX-Forwarded-Host header is useful to determine whichHost was originally used.
A standardized version of this header is the HTTPForwarded header, although it's much less frequently used.
| Header type | Request header |
|---|---|
| Forbidden request header | No |
In this article
Syntax
http
X-Forwarded-Host: <host>Directives
<host>The domain name of the forwarded server.
Examples
http
X-Forwarded-Host: id42.example-cdn.comSpecifications
Not part of any current specification.