LOC Record
Location
- Type code
- 29
- Status
- In use
- Defined in
- RFC 1876
What the LOC record is for
RFC 1876 defines LOC to attach a physical location to a domain name. It stores latitude and longitude in thousandths of a second of arc, altitude in centimetres, and three precision values: the size of the thing described and the horizontal and vertical uncertainty.
The RFC is Experimental, and few clients read LOC records. Geolocation services generally do not use them.
Wire format and fields
| Field | Size | Meaning |
|---|---|---|
| VERSION | 8 bits | The format version. Must be 0. |
| SIZE | 8 bits | The diameter of a sphere enclosing the entity, in centimetres, as a base and a power-of-ten exponent (4 bits each). |
| HORIZ PRE | 8 bits | The horizontal precision (diameter of the circle of error), in the same encoding as SIZE. |
| VERT PRE | 8 bits | The vertical precision, in the same encoding as SIZE. |
| LATITUDE | 32 bits | Thousandths of a second of arc, with 2^31 as the equator; larger values are north. |
| LONGITUDE | 32 bits | Thousandths of a second of arc, with 2^31 as the prime meridian; larger values are east. |
| ALTITUDE | 32 bits | Centimetres from a base 100,000 m below the WGS 84 reference spheroid. |
Zone file syntax
<owner> <ttl> IN LOC <d1> [<m1> [<s1>]] <N|S> <d2> [<m2> [<s2>]] <E|W> <alt>m [<size>m [<hp>m [<vp>m]]]
Example
The LOC record at caida.org, fetched from live DNS on 27 November 2026:
caida.org. 14400 IN LOC 32 53 1.000 N 117 14 25.000 W 107.00m 30m 10m 10m
Common mistakes
- Writing decimal degrees (37.7749 N). The presentation format is degrees, minutes and seconds.
- Leaving out the precision values without realising the defaults are 1 m size, 10,000 m horizontal and 10 m vertical precision, which may not match what you meant.
- Treating altitude as height above sea level. It is relative to the WGS 84 spheroid, which can differ from sea level by tens of metres.
- Expecting browsers or geo-IP databases to use LOC. Very little software reads it.
Specifications
- RFC 1876: A Means for Expressing Location Information in the Domain Name System
- IANA DNS Resource Record (RR) TYPEs registry: type code and status
Related record types
Domain Intelligence APIs
Get started with our easy-to-use API docs.