Umami Shows Wrong Country or "Unknown" Location

Share
Workaround available Self-hosted Updated November 13, 2026Based on 4 user reportsHow we research

Quick answer

Self-hosted Umami reads location from proxy headers or the visitor IP. If a proxy hides the real IP or sends only country headers, everyone shows as Unknown or as your server's country. Forward the real IP and Cloudflare location headers, or set SKIP_LOCATION_HEADERS.

Most likely fix: Enable Cloudflare location headers

How to fix it

Try these in order — the most common fix is first.

  1. 1. Enable Cloudflare location headers

    1. In Cloudflare, open your site > Rules > Settings > Managed Transforms
    2. Turn on Add visitor location headers
    3. In Nginx, add proxy_set_header for CF-IPCountry, CF-Region-Code and CF-IPCity using $http_cf_ipcountry etc.
    4. Restrict your origin so only Cloudflare can reach it
    Did this fix it?
  2. 2. Forward the real visitor IP

    1. Make your proxy pass X-Forwarded-For / X-Real-IP
    2. If you use a custom header, set CLIENT_IP_HEADER to it
    3. Set TRUSTED_PROXIES to your proxy IP ranges (or presets like private)
    4. On cloud load balancers that drop the IP, enable proxy protocol
    Did this fix it?
  3. 3. Use the built-in geo database

    1. If you only get country headers, set SKIP_LOCATION_HEADERS=1
    2. Optionally set GEO_DATABASE_URL to a MaxMind-compatible MMDB file
    3. Restart Umami
    Did this fix it?

Symptoms

All visitors appear from one country (often the server's), countries show as Unknown, or city and region are missing or garbled.

Why it happens

  • Reverse proxy or load balancer not forwarding the client IP
  • Cloudflare sending only CF-IPCountry by default
  • Multiple proxies in a chain without TRUSTED_PROXIES set
  • A non-standard IP header not configured

This guide also covers

  • umami country unknown
  • umami wrong location
  • umami cloudflare location
  • umami all visitors same country

Still not working?

If Umami keeps failing, you're not alone. See every Umami problem users report or the alternatives people switch to.

Done fighting Umami? Our small team builds your own Umami alternative, made for how you work. On your domain or hosted by us. Price agreed together.

Get a quote
Fixed it? Share this guide

Other Umami errors

All 12 Umami errors and fixes →