# LOC record

A LOC (location) record publishes latitude, longitude and altitude for a name, such as where a server or office is. It's an old, little-used record; nothing on the web depends on it.

- Record type: LOC
- Type number: 29
- Used for: Information
- How common: Rare
- Defined in: RFC 1876

## Format

```
<name> <ttl> IN LOC <lat d m s> N|S <lon d m s> E|W <altitude>m [size]m [horiz precision]m [vert precision]m
```

| Field | What it means | Accepted values |
| --- | --- | --- |
| Latitude | Degrees, minutes, seconds, then N or S. | 0 to 90 degrees. |
| Longitude | Degrees, minutes, seconds, then E or W. | 0 to 180 degrees. |
| Altitude | Metres above sea level. | -100000 to 42849672m. |
| Size and precision | Size of the area, and horizontal and vertical precision. | Metres; default 1m, 10000m, 10m. |

## Examples

### An office in London

```
office 3600 IN LOC 51 30 26.000 N 0 7 39.000 W 20m 10m 100m 10m
```

Latitude 51°30′26″N, longitude 0°07′39″W, 20 metres up.

## TTL

Any; locations rarely change.

## Common mistakes

- Decimal degrees (51.507). LOC uses degrees, minutes and seconds.
- Forgetting the m after altitude.

## At your DNS host

- Cloudflare and Google Cloud DNS support LOC.

## Questions

### Is the LOC record used for geolocation of visitors?

No. IP geolocation services don't read it. It only says where the owner claims a name is.

## Related

- [HINFO record](https://lemon.domains/dns-records/hinfo.md)
- [RP record](https://lemon.domains/dns-records/rp.md)
- [TXT record](https://lemon.domains/dns-records/txt.md)

Interactive version with a record checker and live lookup: https://lemon.domains/dns-records/loc
