My Web Application (Code) Uses The IP Address Of Users And Stopped Working With Ezoic?

Ezoic Staff -

If your application is no longer receiving the correct IP addresses of your visitors and / or is receiving a lot of duplicate IP addresses, it is most likely because your code is not looking at the X-Forwarded-For header ( The X-Forwarded-For header is part of the HTTP standard and is used both by Ezoic and many ISPs world-wide.

Ezoic sends the IP address of the original web visitor through to your server in the X-Forwarded-For header.

In PHP it is available in: $_SERVER['HTTP_X_FORWARDED_FOR']

In .NET its available in HttpContext.Current.Request.Headers["X-Forwarded-For"].


For any further queries please reach out to your account representative or

Have more questions? Submit a request


  • 0
    Ezoic Customer Service

    from Wikipedia:


    The X-Forwarded-For (XFFHTTP header field is a  de facto standard for identifying the originating  IP address of a client connecting to a  web server through an  HTTP  proxy or  load balancer. This is an HTTP request header which was introduced by the  Squid caching proxy server's developers. An effort has been started at the  Internet Engineering Task Force (IETF) for standardizing the Forwarded HTTP header. [1]

    In this context, the caching servers are most often those of large ISPs who either encourage or force their users to use proxy servers for access to the  World Wide Web, something which is often done to reduce external bandwidth through caching. In some cases, these proxy servers are transparent proxies, and the user may be unaware that they are using them.

    Without the use of XFF or another similar technique, any connection through the proxy would reveal only the originating IP address of the proxy server, effectively turning the proxy server into an  anonymizing service, thus making the detection and prevention of abusive accesses significantly harder than if the originating IP address was available. The usefulness of XFF depends on the proxy server truthfully reporting the original host's IP address; for this reason, effective use of XFF requires knowledge of which proxies are trustworthy, for instance by looking them up in a whitelist of servers whose maintainers can be trusted.

Please sign in to leave a comment.
Powered by Zendesk