IP geolocation
IP geolocation adds the CF-IPCountry
header to all requests to your origin server.
Cloudflare automatically updates its IP geolocation database multiple times per week.
Free | Pro | Business | Enterprise | |
---|---|---|---|---|
Availability | Yes | Yes | Yes | Yes |
The recommended procedure to enable IP geolocation information is to enable the Add visitor location headers Managed Transform. This Managed Transform adds HTTP request headers with location information for the visitor's IP address, such as city, country, continent, longitude, and latitude.
If you only want the request header for the visitor's country, you can enable IP Geolocation.
To enable IP Geolocation in the dashboard:
- Log in to your Cloudflare account ↗ and go to a specific domain.
- Go to Network.
- For IP Geolocation, switch the toggle to On.
To enable IP Geolocation with the API, send a PATCH
request with ip_geolocation
as the setting name in the URI path, and the value
parameter set to "on"
.
If you find an IP address with a location that you believe is incorrect, report it to ip-corrections@cloudflare.com
along with the correct information as applicable (country, state/province, city name, and ZIP code).
Was this helpful?
- Resources
- API
- New to Cloudflare?
- Products
- Sponsorships
- Open Source
- Support
- Help Center
- System Status
- Compliance
- GDPR
- Company
- cloudflare.com
- Our team
- Careers
- © 2025 Cloudflare, Inc.
- Privacy Policy
- Terms of Use
- Report Security Issues
- Trademark