Description
Ensure IP Geolocation is turned on for the zone, so that Cloudflare adds the CF-IPCountry header, containing the visitor's country code, to every request sent to your origin. Your application and logs can then use the visitor's country for security decisions and analysis.
Rationale
Knowing the country of each request helps detect unusual login locations, apply country-based rules in the application, and investigate attacks. Without the CF-IPCountry header, the origin sees only Cloudflare's IP addresses and has no reliable way to know where visitors come from.
Impact
The origin receives the visitor's country in the CF-IPCountry header
Supports country-based security logic and logging
Geolocation is an estimate and should not be the only signal for strict controls
Default Value
IP Geolocation may be turned off for a zone. Cloudflare recommends the Add visitor location headers Managed Transform for more location detail.
Pre-Requisites
Cloudflare account with Administrator permissions for the zone
Test Plan
Sign in to the Cloudflare dashboard at https://dash.cloudflare.com.
Select your account and the domain (zone) you want to review.
Go to Network.
Verify that IP Geolocation is turned on.
If it is off, follow the implementation steps.
Implementation Steps
Sign in to the Cloudflare dashboard at https://dash.cloudflare.com.
Select your account and the domain (zone) you want to review.
Go to Network.
For IP Geolocation, switch the toggle to On.
Backout Plan
Sign in to the Cloudflare dashboard at https://dash.cloudflare.com.
Select your account and the domain (zone) you want to review.
Go to Network.
For IP Geolocation, switch the toggle to Off.
Reference