Hi @kyushujourneys,
In cases where we’ve seen this happens, the site (or the site’s server) is running a proxy or certain caching systems. Usually caching systems will still pass along the user’s IP address, but sometimes they will not — or possibly will do so in an odd way (somewhere that we don’t check).
The next step is to contact your site’s hosting provider or cache/proxy service (if you have one) to ask where in the headers they are passing the actual user’s IP address.
In case they want to know, here’s where we check (and the order):
$_SERVER['HTTP_CLIENT_IP']
$_SERVER['HTTP_X_FORWARDED_FOR']
$_SERVER['REMOTE_ADDR']
Hope this helps!
Thanks for following up Ethan. Site uses Varnish cache (managed by Proxy Cache Purge plugin) and WP Rocket. I cleared both caches but problem persists.
I contacted my site hosting provider as you requested and they replied this:
reply start >>>>
The IP’s can be parsed from the
HTTP_X_FORWARDED_FOR and REMOTE_ADDR. The headers would look like the
following:
x forarded for: 104.175.38.31, 172.68.174.99
remote add: 104.175.38.31
<<< reply end
What should I do now?
Thanks, KJ
Hi @kyushujourneys,
Thanks for the details!
We’d recommend asking your host why that detection method is failing, as the issue is likely due to a caching issue on the server side or a proxy like Cloudflare.
Hope this helps!