Learn how to see end-user IP addresses in origin requests with Cloudflare's True-Client-IP Header.
Connections from Cloudflare to origin servers come from Cloudflare IPs. True-Client-IP is a solution that allows Cloudflare users to see the end user’s IP address, even when the traffic to the origin is sent directly from Cloudflare.
When the True-Client-IP feature is enabled, Cloudflare adds a
True-Client-IP header to the request sent to the origin with the IP address of the end user.
True-Client-IP supplements the current
X-Forwarded-For headers. We recommend relying on the
True-Client-IP) instead of
X-Forwarded-For headers if you need the actual client (visitor) IP address.
Enable True-Client-IP Header
To enable the True-Client-IP header,
- Log in to your Cloudflare account.
- Navigate to the Network app of the Cloudflare dashboard.
- For True-Client-IP Header, select On.