Skip to main content

IP geolocation now covers more visitors at higher resolution

By Steven Van ·

Enabled for all Vercel projects, the update gives postal codes for 90% of traffic, and VPN and hosting-provider visitors may now resolve elsewhere.

Vercel's IP geolocation now returns city-level data for nearly all requests and postal-code data for 90% of traffic. The change comes from resolving visitor locations with finer network granularity, and it is enabled for all projects with no code or configuration changes.

What changed

Geolocation data is also refreshed more often, so locations keep up as IP ranges are reassigned and routing changes. The existing geolocation headers and the geolocation() helper in @vercel/functions return the same fields as before for Vercel Functions and Routing Middleware.

Some visitors will resolve differently

Anyone using geolocation for access controls, localization or compliance may see some visitors resolve to a different city or country. This is most common for traffic from VPNs, hosting providers and leased IP ranges.

  • Physical termination location: subnets announced from a hosting provider in a different country than their regional internet registry (RIR) record now resolve to the data center where the traffic actually terminates.
  • Testing geo-dependent routes: access rules should be verified against an IP's active network location rather than its static registry allocation.

The request headers documentation lists all available geolocation headers and fields.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →
Sources

Original source

Read IP geolocation now covers more visitors at higher resolution on Creators Toolbox