Called the hosting provider they checked the server logs and there is nothing being blocked in the Server logs.
Also disabled the Cache (WP Rocket) on the page in question without any luck.
If I go to the IP Lookup age, I find the IP address that I am connecting from, either my local IP or the USA one that is assigned when I connect via VPN, and they Lookup correctly.
Can you enable the “Debugging Log” in plugin settings and check the “debug.log” generated in the plugin folder after you visited your website?
Please login your IP in the log file and check the action involved.
As I explained in the support request, I already enabled the logging.
All IPs logged in the log file are that of the server, not the actual clients IP.
When I visit the site, my IP is not in the log file. The log file shows the actions I preformed, but in the client IP field it has the server IP. So it never fires the rule that is configured for another country.
It looks like your website is hosted behind a reverse proxy server. Please consult your web hosting provider to make sure it is forwarding the correct client IP to your backends.
Thank you, I have logged a ticket with the hosting provider to investigate, I did call them yesterday and said it should not be the case, but maybe if another support person looks at the issue they might pick something up.
Further feedback, I had a look at the Web access log on the server and it contains the correct client IP address, so its only the IP2Location log that shows the Server IP.
We run WP Rocket, might it be a Cache issue?
Are you able to disable the cache and try again to see if there is anything different?
Since you said the IP detected in the IP lookup page is correct, the plugin should be no problem getting your actual IP.
I have disabled the caching on the pages in question, and it did not make any difference.
I would need to disabled the entire cache plugin to switch it off, and that would be a problem.
From our previous testing, there is a conflict between caching plugins and the redirection. I’m afraid that this plugin will not work properly.
Thank you.
Unfortunately the cache plug in is non negotiable, so we will find a alternative option or change the website design.