This is the second article in a four part series on Geotargeting. Click here to read part one.
In today’s digital ad market, geotargeting depends on mapping a user’s IP address to a physical location, a task every ad server outsources to my knowledge. This is because the process of assigning a geographic location to an IP is messy and complex to say the least. Just because the ad server outsources the functionality however doesn’t give Ops an excuse to ignore this important and highly utilized feature.
How is an IP Address Associated with a Geographic Location?
By and large, IP addresses are arbitrary – meaning they could be anywhere, and there isn’t much rhyme or reason to their values from a geographic perspective. It isn’t as though if the IP address starts with a 1 it is always located in the United States, for example. Instead, companies like Digital Envoy use a multi-layered approach to assign geographic qualities to a user, some highly technical, and some which are just common sense, and some that are a combination of the two.
On the common sense side, a fair amount of geolocation companies can leverage Regional Internet Registries, or RIRs, to assign high level qualities, like country or continent. The RIRs each own dedicated ranges of IP values and exist to allocate IP addresses within their regions, and cooperate among each other to ensure that the same IP isn’t being used in more than one place. So placing the IP address within a specific RIR’s range allows the service to identify location at a very high level. Some geolocation services are rumored to work with large registration based sites as well, and have zip code information that a user might manually enter during a sign up process.
Pings, Traceroutes, Reverse DNS, and Other Technical Methods of Geolocation
From there though, the heavy lifting is usually done through a combination of three technical processes known as pings, traceroutes, and reverse DNS lookups. Let’s run through a high level explanation of all three processes, and then explain how they work in concert to geographically locate a single IP address.
A ping is just a small piece of information sent from one computer to another, with a request to call the originating computer back. Pings can also record the round trip time of the journey, and are used for a variety of administrative network processes. Think of it like a submarine’s sonar technology, applied to the internet.
Tracerouting is basically a way to record the network routing process of the ping service, or the detail behind how the ping got from one machine to its destination. Tracerouting records how a ping is routed, who it is routed through, and the time it takes at each step. When information travels across the internet, be it a ping or just regular surfing, it moves through a series of very high speed fiber optic networks owned by various public and private entities. Now, when the information gets physically close to a user, it passes down to an Internet Service Provider (ISP), which sells internet access to consumers. The ISP eventually moves the packet of information to a nearby network router to the user, which connects directly to the user. By using the traceroute utility, the geolocation service can know every system the information was passed through in order to get to its final destination. The important piece of information the service gets from a traceroute is the IP address of that final network router, geographically nearest to the user. You can ping or see the traceroute command in action on your own machine at Network Tools.
With the network router’s IP address in hand, the geolocation service can finally use a technique known as a reverse DNS lookup to identify who owns that network router, which it can use to lock in on the physical location of the user. Reverse DNS is simply a service to identify the hostname of an IP address, that is, who owns an IP address. For many home computers, the host ends up being the ISP. For businesses, the host ends up being the company’s domain. DNSStuff provides a reverse DNS lookup service – just enter an IP address into their ‘IP Information’ tool to try it out. (more…)