Cloudflare Plus - Breaks Geo IP Functionality from WP Plugin

Hello all, new user here. I was not sure where to file this request, and I searched the forums exhaustively and could not find the answer seemingly.

My issue seems very simple, however I cannot determine the exact setting that causes it.

We use a WP plugin called Geo IP Detection which allows shortcode placement, and hides or shows content based on settings. Example, we only want a certain phone number to show to users in certain states.

This is the plugin:

Using the free version of Cloudflare, there did not seem to be an issue. Upon upgrading to Cloudflare Plus, the Geo IP detection from the plugin seems to be broken or very inconsistent.

The plugin uses something called: Maxmind GeoIP Lite City, which I believe is a downloaded database or something of the sort.

I can pinpoint the functionality breaking exactly to the day Cloudflare Plus was enabled.

In the last two days, I also had site speed optimizations made to the website where an expert also tweaked a bunch of the Cloudflare settings, but this is coincidence and I believe the issue occurred as a result of Cloudflare Plus simply being enabled (most likely with a setting NOT available on Cloudflare Free).

Anyone have any ideas as to what might cause this Geo Ip Plugin to be unable to get an accurate reading? Typically what now happens is that states that should be seeing a certain number, are not seeing the correct number. Occasionally the number is correct but as of right now it’s too inconsistent.

Thanks in advance.

There is no such thing. That must be some paid package that your host is selling.

Which is?

It is just a guess, but maybe your host is not rewriting IP addresses, hence it is always the IP addresses of the Cloudflare proxies which show up and not the clients’ ones. If that is the case you will need to contact your host, so that he reconfigures the server.

Assuming you are on partner setup (which that plus package would suggest) your host should be the first contact in any case.

Yes, I have Cloudflare Pro, (inside my host they call it Cloudflare Plus for some reason, but it seems to just be an API interface naming convention).

The functionality breaking (from the WP plugin) is the ability to recognize a user’s GEO IP accurately, to therefore display the right content.

There are two notable settings in the plugin:

Country only Geo IP would not be helpful, as we would also need the US State.

It also indicates that “reverse proxy” does not seem to be needed, but perhaps this is a setting to try.

Basically I am struggling to find and answer, and was wondering maybe a certain Cloudflare setting was a known issue for Geo Ip grabbers, but the issue might be more complex than that :slight_smile:

Cloudflare does not provide the US state in the header. There is some support for workers, but thats not what we are talking about I presume.

You either need the IP address rewritten or configure that plugin to take the Cloudflare header into account.

Thanks for the comments.

I am going to test the setting “BETA: Enable AJAX endpoint to get the information for the current IP even on cached pages.” Perhaps cached pages were being too aggressively served without getting the IP each time. This might solve it.

The second option is probably the most likely, but that really is a question either for your host or the developer of the plugin I am afraid.

This topic was automatically closed after 14 days. New replies are no longer allowed.