<< Back to All Blogs

IP Geofeed and How to Setup One?

Posted on December 14, 2023

Understanding IP Geofeed and Setup Process

Internet service providers (ISP) increasingly rely on IP Location information to enhance their user experience. This information serves various purposes, such as:

  • Redirecting traffic to a closest serving location
  • Presenting content in a local language
  • Pricing displayed in a local currency
  • Analysing incoming traffic based on location
  • and a lot other use cases.

However, IP Location users may face performance issues if their ISP allocates an IP block in a different region. Unfortunately, there is no centralized platform for making the changes to IP blocks public. This lack of transparency can result in customer complaints, sometimes directly to the ISP.

What is an IP Geofeed?

"IP Geolocation Feed", a.k.a. "IP Geofeed" or "Geofeed", is a standard format to publish the IP blocks and associated geolocation information. Geofeed is a CSV formatted file, typically distributed over an http(s) link.

Google authored the principle in July 2013. RFC 8805 standardized the principle in August 2020 under the title A Format for Self-Published IP Geolocation Feeds.

Geofeed is now a gold standard to share IP geolocation information and changes. An ISP or any organization can publish it's Geofeeds. The interested IP Location providers can poll and parse these geofeeds and merge with their geolocation data.

Why a Geofeed is important?

Geofeeds makes it easy for the network operators to share IP geolocation data using a simple and common format. And it helps IP location providers to quickly update geolocation information in their database. It has enormous benefits as outlined below.

More Effective Communication

IP geolocation databases lack frequent and in time updates because of the communication barrier. Geofeeds resolve the time-consuming process, saving time for the team in a long run.

Frequent Updates

IP geolocation providers can consume the updates from geofeeds as soon as they're available, saving a ton of time. Geofeeds also allow geolocation providers to pinpoint the issues before they ever arise for the customers.

Efficient Data Processing

Geofeeds use a standardized format and are easily available over an http(s) link. We can merge the IP geolocation changes into our database using Geofeeds and can fairly automate the process.

Better Customer Satisfaction

Inaccurate and outdated geolocations can negatively impact the customers. But, using a geofeed, geolocation database can get IP geolocation updates long before they affect the customers.

Geofeed Format

Geofeed is a CSV (Comma-Separated Values) File and each line in it represents geolocation for an IP prefix.

ip_network,iso_country_code,iso_region_code,city_name,postal_code

Here are the details for each field:

  1. IP network/prefix: IPv4 or IPv6 network in the Classless Inter-Domain Routing (CIDR) format (e.g. 1.0.0.0/24)
  2. Country Code: the 2-letter ISO 3166-1 country code (e.g. 'US' for United States of America). This field is optional.
  3. Region: the ISO 3166-2 region and country code (e.g. 'US-NY' for United States and New York). This field is optional.
  4. City: the UTF-8 encoded text and English names of the cities are recommend as Munich for German München. This field is optional.
  5. Postal Code: free UTF-8 text excluding the comma character. This field is optional.

Example Geofeed

#ip_prefix,country_code,region,city,postal_code
140.174.176.0/24,US,US-TX,Dallas,
2604:6600:9a::/48,KR,KR-11,Seoul,

Real-world Examples of Geofeeds:

From Central Church: https://raw.githubusercontent.com/Central-Church/geofeed/main/geofeed.csv
From Google: https://www.gstatic.com/ipranges/cloud_geofeed

How can you distribute your Geofeed?

Quick distribution and automatic retrieval is the aim to publish the Geofeeds. You may adopt an optimal solution of your choice from the following options to host your Geofeed:

Through Spreadsheets

The quickest way to publish your Geofeed is Google Sheets. Just upload your CSV file to Google Sheets, make the document public and share the public URL with us. Note: you can verify the public permissions by opening the URL in an incognito browser. If the verification is necessary, then you need to edit the file permissions to public.

Keep the file updated with latest IP location information as a living geofeed following the format described above.

Through a Github Repo

Another quick way to publish your Geofeed is public Github repository and upload your Geofeed to it. Then, send us the repository link. This solution will track the changes in your geofeed as well which is an additional advantage of this solution.

In a public repository, all files are remotely accessible through HTTPS. Even, you can use a custom domain to distribute the Geofeed through this method.

Through Your Website

This is the best to publish your Geofeed under your own domain. Make the URL publicly accessible through http(s) without verification. Any IP geolocation provider can fetch the URL for changes you publish.

You can upload your Geofeed to your company's domain e.g. example.com/geofeed or geofeed.example.com.

How often should you update your Geofeed?

In a perfect world, you must update your Geofeed as soon as the geolocation changes are available to you on your side. Your network admins must have the knowledge about such files and must maintain them for any geolocation changes.

This way, our data team can keep the IP geolocation database up-to-date with the latest geolocation information. And, we can seamlessly adjust the digital world around your customers so they can access the content and services. In the end, your customers are satisfied for using your services and you're the hero.

How can you share your Geofeed with ipgeolocation.io?

If you're satisfied with your Geofeed and have made the URL public, email us the link at support@ipgeolocation.io.

Share your Geofeed with a Wider Audience

You can update the inetnum object in the whois and add a geofeed field to share your Geofeed with a wider audience. Organizations consuming geofeed data will automatically discover your geofeed. You can refer to RFC 9092 to understand this field in the greater detail. Here is an example,

inetnum:    192.0.2.0/24 # example
geofeed:    https://example.com/geofeed.csv