Documentation Settings Page IP Detection Settings

IP Detection Settings

The IP Detection settings in WP Statistics are designed to accurately capture and log the IP addresses of visitors to your website. These settings allow you to select the preferred method of IP retrieval to ensure compatibility with your server configuration and to enhance the precision of the tracking.

Your IP Information

This section displays the IP address as detected by the SeeIP.org service. It serves as a quick check to confirm that your website can retrieve IP information correctly.

  • Troubleshooting: If the IP data is not being displayed, you should ensure your internet connection is active and retry. If issues persist, it may be necessary to consult with your hosting provider.

Main IP Detection Method

  1. REMOTE_ADDR (Selected by Default)
    • The most common method used to retrieve the visitor’s IP address. This method reads the IP address directly from the server variable REMOTE_ADDR, which is the standard and most reliable method.
    • Example: If your website is hosted on a typical server without a reverse proxy, this method will likely provide accurate results.
  2. HTTP_CLIENT_IP
    • This method attempts to obtain the IP address from the HTTP_CLIENT_IP server variable, which is set by some proxy servers.
    • Example: Use this method if you know that your visitors are coming through a proxy that sets the HTTP_CLIENT_IP variable with the original IP.
  3. HTTP_X_FORWARDED_FOR
    • This method retrieves the IP from the HTTP_X_FORWARDED_FOR server variable, commonly used when the server is behind a reverse proxy or load balancer.
    • Example: In cases where you have a load balancer or a reverse proxy set up, the HTTP_X_FORWARDED_FOR might contain the actual IP address of the client.
  4. HTTP_X_FORWARDED, HTTP_FORWARDED_FOR, HTTP_FORWARDED
    • These are alternative server variables that may contain the client’s IP address if other headers are not set. These are less commonly used but can be selected if your server configuration requires it.
    • Example: If your server documentation specifies that one of these headers is used to store client IP information, select the corresponding option.
  5. HTTP_X_REAL_IP
    • Similar to HTTP_X_FORWARDED_FOR, this method is used by some servers to store the original IP address of a client when a proxy or load balancer is in use.
    • Example: If you are using Nginx as a reverse proxy, it might set the HTTP_X_REAL_IP with the client’s IP address.
  6. HTTP_X_CLUSTER_CLIENT_IP
    • This option is used to get the client’s IP address in cluster environments where multiple proxies or load balancers are present.
    • Example: Use this method if your website is part of a cluster and the client IP is passed through the HTTP_X_CLUSTER_CLIENT_IP variable.

Custom Header for IP Detection

If your server uses a non-standard header to store the IP address of the client, you can specify it here. This is for advanced users with custom server configurations.

  • Example: If you are using Cloudflare, you might enter CF_CONNECTING_IP in this field to use the IP address provided by Cloudflare.

Related Document: How to Configure IP Detection in WP Statistics for Accurate Visitor Tracking