Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

HTTP header X-Forwarded-Host

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

The HTTP X-Forwarded-Host header is a request-type header de-facto standard header. This header is used to identify the original request made by the client. Because the hostnames and the ports differ in the reverse proxies that time this header took the leader and identify the original request. This header can also be used for debugging, creating location-based content. So this header kept the privacy of the client. The root version of this header is HTTP Forwarded.

Syntax:

X-Forwarded-Host: <host>

Directives: This header accepts a single directive as mentioned above and described below:

  • <host>: This directive holds the domain name of the forwarded server.

Below examples illustrate the HTTP X-Forwarded-Host header: 

Examples:

  • In this example visited site was forwarded from the mentioned host website.
X-Forwarded-Host: www.example-cdn.com
  • In this example forwarded host is geeksforgeeks cdn page.
X-Forwarded-Host: www.geeksforgeeks.org

To check the X-Forwarded-Host in action go to Inspect Element -> Network check the request header for X-Forwarded-Host like below. 

Supported Browsers: The browsers are compatible with the HTTP X-Forwarded-Host header is unknown till now.

My Personal Notes arrow_drop_up
Last Updated : 10 May, 2023
Like Article
Save Article
Similar Reads
Related Tutorials