X-Forwarded-For Header
Table of Content
The X-Forwarded-For Header is an HTTP header field that identifies the originating IP address of a client connecting to a web server through an HTTP proxy or load balancer. This header assists in logging, debugging, and identifying client request locations.
Syntax
The syntax of this header follows this format:
X-Forwarded-For: <client>, <proxy1>, <proxy2>
The <client>
is the client IP address, and <proxy>
identifies the proxies' IP addresses respectively.
Directives
The directives for the X-Forwarded-For header are the IP addresses. The initial IP address identifies the client on the server side. The subsequent ones represent the respective proxies involved in routing the HTTP request.
Examples
A simplified example usage could look like this:
X-Forwarded-For: 203.0.113.195, 70.41.3.18, 150.172.238.178
This implies the IP address 203.0.113.195
as the client's, and the other two as the proxies, which the client’s HTTP request has passed.
Browser Compatibility
Browser | Compatibility |
---|---|
Chrome | Supported |
Firefox | Supported |
Safari | Supported |
Opera | Supported |
Edge | Supported |
Please note that this information is subject to change as browser developers could update their compatibility at any time.
How to modify X-Forwarded-For header
ModHeader is a Chrome extension used to modify HTTP request headers. After installing it, click on the ModHeader icon and then click on +
to add a new header. Type X-Forwarded-For
in the name field, and for value insert the specific IP address you want to use as the originating IP.
For instance, you can type X-Forwarded-For
in the name field and 123.45.67.89
(or any preferred IP address) as the value. This implies that to the web server, you would appear as browsing from 123.45.67.89
.
ModHeader is useful for testing and debugging applications, where a specific originating IP is required.
Note: ModHeader can change X-Forwarded-For
header, but it will not hide your IP, and may not work on all servers. To completely change your IP, try using NordVPN.