Skip to main content
LOC

LOC Record

Active

The LOC (Location) record stores the geographic location of a host – latitude, longitude, altitude, and the accuracy of the measurement.

name TTL IN LOC d1 [m1 [s1]] {"N"|"S"} d2 [m2 [s2]] {"E"|"W"} alt["m"] [siz["m"] [hp["m"] [vp["m"]]]]

In one line

The LOC (Location) record stores the geographic location of a host – latitude, longitude, altitude, and the accuracy of the measurement. Originally intended to build a global DNS-based geolocation service, LOC records are rarely used in practice but appear in some network infrastructure documentation and academic DNS datasets.

Description

LOC records (RFC 1876) encode coordinates in degrees/minutes/seconds with altitude in centimeters and horizontal/vertical accuracy. The format was designed to be machine-readable for geographic routing decisions. In practice, IP-based geolocation services (MaxMind, IP-API) replaced DNS LOC records for most use cases. LOC records are still occasionally used in NOC documentation and some academic DNS experiments.

Examples

Location record
shell
example.com. 3600 IN LOC 51 30 0.000 N 0 7 34.000 W 10.00m 100m 100m 100m
# ^ London coordinates
Query LOC
shell
dig example.com LOC

Specification

RFC 1876 – DNS LOC record specification →