Publish and Verify an IPv4 Geofeed
Publish a geofeed as comma-separated values (CSV) mapping prefixes to accurate deployment locations. Serve it over HTTPS and arrange discovery through the relevant resource record. Then verify provider results separately. A reachable file establishes publication, not adoption by databases or applications.
Keep the different location signals separate
| Signal | What it can describe | What it does not establish |
|---|---|---|
| RIR and registry record | Resource administration and listed contacts | The physical location of every use |
| BGP announcement | Observed routing origin and path | A reliable country or city assignment |
| Reverse DNS | An address-to-hostname mapping | A universally accepted geolocation |
| Geofeed | The operator’s published location mapping | Mandatory adoption by every database |
Use WHOIS/RDAP to establish the record and contacts. For a location discrepancy already affecting users, the geolocation correction guide explains evidence collection and vendor follow-up. This page owns the reusable publication procedure.
Publishing the CSV, exposing its registry reference, incorporation by a database and use by an application are separate milestones. The dashed transitions depend on the consumer’s own process. This conceptual sequence shows no shared update deadline and makes no claim that every provider consumes the feed.
View full diagramConfirm prefix scope and publication responsibility
List the exact prefixes and the places where they are deployed. For shared egress, mobile users, anycast or a prefix spanning several sites, do not invent one precise city just to complete a field. Use the least-specific truthful location that the deployment supports, or omit unsupported location fields.
Agree who maintains the feed, who controls the registry reference and who responds to verification questions. For third-party space, record these roles in the address-management handover. The hosting domain of a feed does not by itself establish authority over every listed prefix.
Build and validate the CSV file
The self-published geofeed format uses UTF-8 CSV entries in this order:
ip_prefix,country_code,region,city,postal_codeThat line describes the fields; do not include it as a data header. An illustrative file for documentation prefix 192.0.2.0/24 is:
# Documentation examples only; do not publish these as your resources.
192.0.2.0/25,DE,DE-HE,Frankfurt am Main,
192.0.2.128/25,NL,NL-NH,Amsterdam,Country codes use the two-letter ISO country form, and a non-empty region uses an ISO subdivision code such as DE-HE. City is optional text. Leave the deprecated postal-code field empty. For country-level detail only, retain the empty trailing fields: 192.0.2.0/24,DE,,,.
Check that every prefix is within your authorized scope and uses the intended boundaries. Reject duplicate exact prefixes. Nested entries are possible, with a more-specific match carrying the finer location, but they can hide stale data: prefer non-overlapping entries when you do not need overrides. Avoid CSV spreadsheets that silently change delimiters or encodings. Export proper CSV rather than an HTML spreadsheet page.
For a basic local check of the illustrated IPv4 subset:
python3 - <<'PY'
import csv, ipaddress
from pathlib import Path
seen = set()
for number, line in enumerate(Path("geofeed.csv").read_text(encoding="utf-8").splitlines(), 1):
line = line.split("#", 1)[0].strip()
if not line:
continue
row = next(csv.reader([line]))
assert len(row) == 5, (number, "expected five fields")
network = ipaddress.IPv4Network(row[0], strict=True)
assert network not in seen, (number, "duplicate prefix")
seen.add(network)
assert not row[1] or (len(row[1]) == 2 and row[1].isascii() and row[1].isalpha()), (number, "country code syntax")
assert not row[4], (number, "leave postal code empty")
print("Basic checks passed; verify scope and location codes separately.")
PYThis deliberately narrow check expects IPv4 CIDR rows with five fields. It does not validate the complete standard, ISO code membership, authorization, geographic accuracy, overlaps or a cryptographic signature. Verify those separately. Use consistent CRLF line endings when exporting the feed; do not copy the explanatory header into it.
Publish a stable public HTTPS resource
Use a stable URL on infrastructure the publishing operator controls. The resource must return the CSV itself without a login, expiring download token, cookie consent screen or JavaScript challenge. Avoid placing personal location details, customer identities or operational secrets in a public feed.
curl --fail --show-error --silent --location \
--proto '=https' --proto-redir '=https' \
--dump-header geofeed.headers \
--output geofeed.download.csv \
https://geo.example.net/geofeed.csvThe example hostname is reserved. Substitute your real URL. Inspect the saved body, final status and redirects: HTTP 200 containing a login page is not success. Compare the downloaded rows with the intended file. A useful CSV content type is text/csv; charset=utf-8; successful decoding matters more than a filename ending in .csv.
Keep previous versions and a change record. Publish updates consistently so a fetcher does not observe a partially written file. If signatures are used, validate the final signed artifact with the tools and consumer requirements of that deployment.
Connect the feed to the relevant registry record
Have the authorized record maintainer publish the supported reference. In the RIPE Database, the resource-object documentation describes the geofeed: attribute. A fragment is:
inetnum: 192.0.2.0 - 192.0.2.255
geofeed: https://geo.example.net/geofeed.csvThis is not a complete object to submit. Keep its existing registration, contacts and authorization fields. Confirm that the object’s type and privacy rules permit publication. Where the registry supports a remarks: Geofeed discovery convention instead, use the exact supported mechanism; do not assume RIPE syntax applies to every registry.
Inspect more-specific resource records as well as the covering allocation. A more-specific record with its own feed reference can direct a consumer to another file. Prefer one current reference per relevant object rather than leaving conflicting old and new URLs. Public registration of the URL and a provider’s acceptance of your authority remain separate checks. HTTPS protects transport; it does not prove that the publisher controls the listed IP resources. Signed-feed authentication is also distinct from a ROA authorizing a BGP origin.
Verify provider use and maintain the feed
Track four observations: the file’s current contents, the public discovery record, the selected provider’s result, and the affected application’s behavior. Record the address tested, UTC timestamp and dataset/API edition when available. Re-test samples from each distinct location entry; one correct address does not establish the whole prefix’s result.
| Failure point | Next action |
|---|---|
| CSV URL cannot be fetched | Fix HTTPS, redirects, access controls and the returned body |
| File works but record has an old URL | Ask the authorized maintainer to correct the discovery reference |
| Covering and more-specific references disagree | Reconcile publication scope and current operator responsibility |
| Provider still reports old data | Check that provider’s ingestion/correction route with timestamped evidence |
| Provider is correct but an application is not | Investigate its dataset copy, cache and other location signals |
When deployment changes, update the location statement with the responsible operator. On return or reassignment, coordinate removal of obsolete entries and references so a former user does not keep publishing an inaccurate location. A replacement feed is not an address-ownership transfer.
Include geofeed hosting, registry access and change responsibility when evaluating the IPv4 service arrangement. Do not treat them as capabilities included automatically with an address block.