X-Forwarded-Host

The X-Forwarded-Host (XFH) header is a de-facto standard header for identifying the original host requested by the client in the Host HTTP request header.

Host names and ports of reverse proxies (load balancers, CDNs) may differ from the origin server handling the request, in that case the X-Forwarded-Host header is useful to determine which Host was originally used.

Header type Request header
Forbidden header name no

Syntax

http
X-Forwarded-Host: <host>

Directives

<host>

The domain name of the forwarded server.

Examples

http
X-Forwarded-Host: id42.example-cdn.com

Specifications

Not part of any current specification.

See also