Are geos of IP address moving targets?
The main method for advertisers to target a specific country is to use the geolocation associated to IP addresses. Although GPS lon/lat can be used as well, the bulk of geo targeting is achieved through IP to geo.
IP subnets are sold and bought every day. That means the geos associated to these IP addresses will also change and sometimes to another state or country. But, how often does this happen? How many IP ranges are sold/bought per day? month? Per year?
Last week Dr. Augustine Fou posted about out-of-geo targeting, which reminded me on some research I did ~1 year ago. In that case an insurance company targeted US states specifically and a percentage (~5%) of visitors arriving on their landing page after clicking on one of their ads came from other US states. The question was: How is this possible?
To answer these questions we’ll take a look at the last 6.5 years of IP-address to country translation tables. The source of these monthly translation tables containing the IP to country is freely available and downloadable from the Internet Archive, see link [1].
Let’s select some countries first. I selected a few countries where Oxford Biochronometrics has clients. In order to query and analyze the monthly IP-2-geo files (see link [1]) they have to be imported into a PostgreSQL database where a table has been created. An import script was written that converts the mmdb files and inserts the data. After importing an index was created for fast data retrieval and the table now contains ~39.7 million IPv4-to-geo rows and ~43.3 million IPv6-to-geo rows are in the table (Jan/2020 -- Aug/2026). Each row represents an IP address subnet which again represents a range of IP addresses.
First, let’s take a look how many IP addresses are assigned to the nine selected countries in August 2026. The number of IP addresses (IPv4 only) is calculated by looking at the ip_start and ip_end values and calculating the difference, which is the range. Tallying up all ranges associated to a country together gives the total unique IPv4 addresses per country for Aug/2026.
In the SQL query below you can see the nine countries, the date (Aug/2026), IP address type is ipv4 and the calculation of the range (end - start).
SELECT A.country_name,
sum(A.ip_end - A.ip_start) as total_ipaddresses
FROM ip2geo.historical_ip2geo A
WHERE A.country_name in ('The Netherlands', 'Germany', 'United Kingdom', 'Luxembourg', 'Canada', 'France', 'Spain', 'United Arab Emirates', 'United States')
AND A.addr_type = 'ipv4'
AND A.pointintime = '2026-08-01'
GROUP BY A.country_name, A.pointintime
ORDER BY A.country_name, A.pointintimeThe result of the query can be seen below.
Country Total available IPv4 addresses (Aug/2026)
------- -----------------------------------------
Canada 99,952,127
France 87,096,959
Germany 141,489,794
Luxembourg 1,677,276
Spain 36,166,399
Netherlands 57,116,313
United Arab Emirates 6,454,383
United Kingdom 135,136,350
United States 1,461,779,660Month over month changes
Now the next logical question is: How many IPv4 addresses did change country between July 2026 and August 2026? Let’s for example look at the United States only? Answer: In total 6,481,313 IPv4 addresses were assigned to other countries and removed from the United States. Secondly, in total 4,715,706 IPv4 addresses were removed from another country and assigned to the United States. That might sound a lot, but, percentage wise this is not that much, respectively 0.44% and 0.32%.

How does this look for other countries? And more importantly how does it look over time? So, let’s plot the change percentages IPv4 change in a chart, see the three figures below. The x-axis contains the months between Jan/2020 and Aug/2026. The y-axis contains the percentage change month over month.

In figure 2 you’ll immediately notice two enormous outliers in Nov/2022 and Feb/2023. In Nov/2022 Germany added 70% new IPv4 addresses to its volume (increased from 137,836,271 to 244,913,052), and the UK added 93% new IPv4 addresses to its volume (increased from 135,130,016 to 278,861,024).
Interestingly, if you look at the next months in Figure 3 you’ll see that the buyers in both countries did sell large subsets of these freshly bought addresses to other countries. That shows that in general IPv4 addresses are not static and especially smaller countries can be much more volatile than you would expect. Another example, the last two years Canada has been adding 5% - 10% new IPv4 addresses monthly, see Figure 2. But, it has also been selling 5% - 10% (different) IPv4 addresses monthly, see Figure 3.

Another interesting metric is to see whether the total number of IP addresses assigned to a country relatively grows or shrinks over time. This can be seen in Figure 5. It can be seen that the number of IPv4 assigned to the UAE has grown 158%, Canada has grown ~145% over the last ~6.5 years. The number of IPv4 addresses assigned to France has decreased with ~11% over the last ~6.5 years.

These charts don’t show the underlying reasons why IPv4 blocks are reassigned from country to country, but it does show that over time an IP-2-geolocation translation table becomes less and less accurate. Hence, these tables need to be kept up to date.
Conclusion
Targeting advertisements to countries based on IP addresses (and not GPS lon/lat) requires an up to date ip-to-geolocation translation table. In the US it might also be important to look at changes from state to state, because as an advertiser you might only want target states where you are licensed to sell. Geolocation targeting mistakes are made very easily when using older IP-2-geo tables. So, the question is: Does your DSP update the IP-to-geolocation regularly? You should verify this. Do you see out-of-geo visitors arriving at your landing page after clicking on an advertisement? If from foreign countries (or non targeted states), you could check whether this geo has bought an IP range previously assigned to your targeted country. If not, verify the IP-to-geolocation using another (commercial) dataset to be sure. And if it is indeed out of geo, you know what question to ask. “When was the last time you updates the IP-to-geo translation table that is used for geo targeting?“
If you use IP addresses in blacklists, whitelists or whatever color list be aware that IP addresses may migrate to another country. So, do check this periodically to ensure you’re not blocking or whitelisting the wrong geos. It’s simple and cheap to check and improves your accuracy of geo targeting. Best is to set an expiration date when putting an IP addresses on a list and once expired automatically remove them.
Btw. Looking at IPv6 gives a completely different picture because the address space is much much larger and different rules apply, that’s why I excluded IPv6, for now. Maybe in a separate post I’ll run the same queries to show how static or volatile IPv6 ranges are over time.
Want more info? Other countries? See the other SQL queries? Other questions? Let me know, feedback is appreciated. Likes and reports are also appreciated.
IP-2-Geo source files:
[1] https://archive.org/download/dbip-country-lite
Glossary
DSP - Demand-side platform
IP subnet - A subnet, or subnetwork, is a logical subdivision of an IP network.



