ESC

Start typing to search across invoices, services, domains, tickets, and more...

Search... Ctrl+K
IP & ASN

Wrong IP Geolocation? Publish a Geofeed (RFC 8805) and Update MaxMind, IP2Location and ipinfo

5 steps 10 min read 5 views 0
On this page

Freshly assigned IP blocks often show the wrong location, for example a server in Japan whose IP appears to be in the US, causing wrong website languages or trouble with streaming and payment risk checks. Inaccurate IP geolocation happens because IP databases such as MaxMind, IP2Location and ipinfo have not been updated. This article explains how to publish a Geofeed (RFC 8805) file, reference it in WHOIS with the geofeed attribute, and submit corrections to the major IP databases, hosting the feed on Debian/Ubuntu or CentOS/Rocky/AlmaLinux.

Step 1: Check the current IP geolocation and WHOIS data

Record what each database currently shows, plus the WHOIS country field, so you can compare later. The WHOIS country is usually the registration country, not necessarily where the IP is used, but some databases take it into account.

curl -s https://ipinfo.io/198.51.100.10/json
whois 198.51.100.10 | grep -iE "inetnum|netname|country|geofeed"

Step 2: Write a Geofeed (RFC 8805) CSV file

A geofeed is a plain CSV file with one prefix per line: prefix, country code (ISO 3166-1), region code (ISO 3166-2, optional), city, postal code (optional). A /24 can be split into smaller prefixes with different locations, and IPv6 works too. Lines starting with # are comments.

# geofeed.csv  (RFC 8805: prefix,country,region,city,postal)
198.51.100.0/25,JP,JP-13,Tokyo,
198.51.100.128/25,HK,,Hong Kong,
2001:db8:100::/48,KR,KR-11,Seoul,
Every prefix in the geofeed must fall inside the WHOIS object that references it; entries outside that range are ignored. Use common English city names.

Step 3: Host the geofeed file over HTTPS

Place the file at any public HTTPS URL, for example geofeed.csv in your website root. Make sure it returns HTTP 200 with the raw content, without login or redirects to an HTML page.

# Debian / Ubuntu: apt install -y nginx    CentOS / Rocky / AlmaLinux: dnf install -y nginx
cp geofeed.csv /var/www/html/geofeed.csv        # Rocky/Alma default root: /usr/share/nginx/html
curl -sI https://www.example.com/geofeed.csv
curl -s  https://www.example.com/geofeed.csv

Step 4: Add the geofeed attribute to WHOIS

To let IP databases discover your feed automatically, reference it in the inetnum/inet6num object. The RIPE database has a dedicated geofeed: attribute; other RIRs can use the "remarks: Geofeed URL" format from RFC 9632. Only the resource holder can edit these objects. For IPs leased from IMIDC, open a ticket with your geofeed URL; as a member of RIPE NCC, APNIC, ARIN and AFRINIC, IMIDC can update WHOIS for you and adjust the country field if needed.

# RIPE NCC (inetnum / inet6num attribute)
geofeed:  https://www.example.com/geofeed.csv
# APNIC / ARIN / AFRINIC (RFC 9632 remarks format)
remarks:  Geofeed https://www.example.com/geofeed.csv

whois -h whois.ripe.net 198.51.100.0/24 | grep -iE "geofeed|remarks"

Step 5: Submit corrections to MaxMind, IP2Location and ipinfo

Some databases pick up geofeeds automatically, but submitting directly speeds things up:

  • MaxMind (GeoIP2 / GeoLite2): use the GeoIP data correction request page (maxmind.com/en/geoip-data-correction-request); you can enter your geofeed URL.
  • IP2Location: submit the range and correct location via the Data Correction page on their website.
  • ipinfo: fill in ipinfo.io/corrections or include your geofeed link.

Update cycles vary from days to weeks, and websites using these databases must then download the new data. Re-check periodically:

for s in ipinfo.io/198.51.100.10/country ipinfo.io/198.51.100.10/city; do
  echo -n "$s: "; curl -s "https://$s"; echo
done

FAQ

How long does a geofeed take to apply?

ipinfo is usually quick; MaxMind typically applies changes with its weekly releases, and downstream apps may lag further. If nothing changes after a month, resubmit with a WHOIS screenshot.

Google still shows the wrong location

Google uses its own location data. Submit Google's IP geolocation feedback form and keep your geofeed and WHOIS consistent.

Can I declare a country where the IP is not actually used?

Don't. A geofeed should reflect real usage; false declarations may be ignored or flagged as untrustworthy.

Still stuck? Open a ticket with IMIDC 24/7 technical support.

Was this answer helpful?

Related Tutorials