What is a Geofeed ? How to publish one ?

ipapi ~ ipapi.co
2 min readSep 1, 2022

What is a Geofeed ?

A geofeed is a simple, structured document to provide information about the geographical locations of IP address ranges. They can be published by Internet Service Providers (ISPs) , Hosting Providers, Content Delivery Networks (CDNs), Data Centers, Network Operators, Large Enterprises and Organizations, Educational Institutions, Government Agencies etc.

Structure of a Geofeed

A geofeed is typically a CSV (Comma Separated Values) file, making it easy to create and read. Each line in the file represents a mapping of an IP address range to a physical location.

An entry in the geofeed file looks like this :

IP Address Prefix, Country, Region, City, Postal Code
  • IP Address Prefix (Required) : a single IP address or
    an IP prefix in CIDR notation
  • Country : 2-letter ISO country code (ISO 3166–1 alpha 2)
  • Region : ISO region code (ISO 3166–2)
  • City : name of the city (UTF-8 text)
  • Postal Code (deprecated) : postal / zip code (UTF-8 text)

Example Geofeed file:

# This is a comment line and it will be ignored 
# The entries below are reserved IPs (should not have a location)
# They are used solely for the purpose of representing valid geofeed lines
192.168.1.0/24, US, CA, San Francisco, 94103
192.168.2.0/24, US, , San Francisco,

Publishing a Geofeed

Once your geofeed file is created, you can host it on your organization’s website or use a file-sharing service like Google Drive, Dropbox, GitHub, or GitLab. The idea is to make the geofeed publicly accessible.

Here’s a sample published file

Updating a Geofeed

You can update the geofeed file when there’s a change in the network assignment. Please keep the published URL unchanged.

Submitting your Geofeed

You can submit your geofeed URL at ipapi.co/update-location

Detailed IETF specs : https://datatracker.ietf.org/doc/html/rfc8805

--

--

ipapi ~ ipapi.co

IP Lookup | IP Geolocation API | IP Address Locator by Kloudend, Inc. USA. Trusted by Fortune 500 !