What is the X-Forwarded-For header?

The X-Forwarded-For (XFF) header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through an HTTP proxy or a load balancer. When traffic is intercepted between clients and servers, server access logs contain the IP address of the proxy or load balancer only. To see the original IP address of the client, the X-Forwarded-For request header is used.

This header is used for debugging, statistics, and generating location-dependent content and by design it exposes privacy sensitive information, such as the IP address of the client. Therefore the user's privacy must be kept in mind when deploying this header.

A standardized version of this header is the HTTP Forwarded header. The Forwarded header contains information from the client-facing side of proxy servers that is altered or lost when a proxy is involved in the path of the request.

X-Forwarded-For is also an email-header indicating that an email-message was forwarded from another account.

Header type      Request header
Forbidden header name      no

Syntax

X-Forwarded-For: <client>, <proxy1>, <proxy2>

Directives

<client>
The client IP address
<proxy1>, <proxy2>
If a request goes through multiple proxies, the IP addresses of each successive proxy is listed. This means, the right-most IP address is the IP address of the most recent proxy and the left-most IP address is the IP address of the originating client.

Examples

X-Forwarded-For: 2001:db8:85a3:8d3:1319:8a2e:370:7348

X-Forwarded-For: 203.0.113.195

X-Forwarded-For: 203.0.113.195, 70.41.3.18, 150.172.238.178

Other non-standard forms:

# Used for some Google services
X-ProxyUser-Ip: 203.0.113.19

آیا این پاسخ به شما کمک کرد؟

 پرینت این مقاله

در همین زمینه

Do you provide socks5 or socks proxies?

Yes we do, you can select from normal proxies or socks at checkout and in your client area when...

Can your proxies be used on classified ads websites?

Yes our proxies can be used on any website, however certain websites such as Craigslist may have...

If my proxies appear to be slow can I get them changed out?

Sure, you can refresh them in your client area, or pay for multiple refrehes. You will also get a...

Can I use your proxies for ticket bots?

We do allow our proxies to be used on TicketMaster, but WE DO NOT guarantee the success rate of...

Proxy IP and Anonymous Types

IPv4: Only IPv4 will connect IPv6: Only IPv6 will connect IPv4 first then IPv6: IPv4 will...