Data quality

How country-code top-level domains relate to location data

A domain ending in a country-code top-level domain, like .de, .jp, or .br, feels like it ought to be a reasonably strong location signal, since the code itself is drawn from the same general concept behind ISO 3166-1 country identification. In practice it is a much weaker and less reliable signal than it appears, and treating it as equivalent to an actual geographic lookup is a mistake worth avoiding.

The core issue is that registering a country-code domain frequently has little or nothing to do with where the registrant, the hosting infrastructure, or the actual audience is physically located. Some country-code domains are widely used well outside their associated country specifically because the code itself happens to spell a recognizable word or abbreviation in another context entirely, a pattern common enough that it has become a well known quirk of the domain system rather than an exception. Even domains registered for entirely conventional reasons frequently have no registration residency requirement at all, meaning anyone anywhere can often register them regardless of any actual connection to that country.

Beyond registration, the server actually hosting content for a given domain can be located anywhere in the world regardless of which country-code extension the domain itself uses, since domain registration and server hosting are two completely independent decisions made separately, often by different parties entirely, for different reasons. A .de domain can be hosted on infrastructure anywhere on the planet with no technical requirement tying the two together at all.

This means a country-code top-level domain is, at best, a weak circumstantial signal about a business's intended market or branding choice, not a reliable indicator of physical location for the domain owner, the hosting infrastructure, or any individual visitor. An actual IP-based geolocation lookup of the server actually serving the content, or of an individual visitor's own connection, is a fundamentally different and far more reliable kind of signal, because it reflects an actual internet routing fact rather than a naming choice made once at registration time and rarely revisited afterward.

If your application needs a genuine read on where a server, a visitor, or a business is actually located, use an actual IPv4 or IPv6 lookup against the relevant IP address, or a proper address lookup where one is available, rather than inferring location from a domain extension. Reserve country-code domain interpretation for what it actually is, a hint about branding or intended market, not a substitute for real geographic data.