Close this search box.


In this article



Recent articles

Overriding the GEO IP header

Complianz contains GEO IP functionality to display the ‘correct’ type of Cookie Banner, either opt-in or opt-out, based on the region from which a visitor reaches your website.

If your site is behind a DDoS protection service such as CloudFlare, that service will be forwarding the traffic to your site. This means that the requests are received from that protection service, and the IP address would be stored in a different ‘header’.

Complianz’ GEO IP implementation will check the following header values (from top to bottom), and if the one being checked either does not exist or equals ‘’, it moves on to the next one:

  • ‘CF-IPCountry’,

You can override the header that Complianz checks with the below filter, in case your set-up requires this:

Change HTTP_FORWARDED_FOR on line 3 to the header that Complianz should check for the IP address.

Join 900.000 users and install The Privacy Suite for WordPress locally, automated or fully customized, and access our awesome support if you need any help!

Complianz has received its Google CMP Certification to conform to requirements for publishers using Google advertising products.