LOC Record Location

The LOC record (Location) stores geographic location information in DNS. It can specify the latitude, longitude, altitude, and precision of a location associated with a domain name. While not widely used, it's defined in RFC 1876.

Look Up LOC Records

Check LOC records for any domain using our free DNS lookup tool.

Look Up LOC Records →

What Is a LOC Record?

LOC records express the physical location of a domain in terms of:

  • Latitude — North/South position
  • Longitude — East/West position
  • Altitude — Height above sea level
  • Size — Diameter of the location sphere
  • Horizontal precision — Accuracy of lat/long
  • Vertical precision — Accuracy of altitude

LOC Record Format

Example LOC Record

example.com.    3600    IN    LOC    37 46 30.000 N 122 25 10.000 W 10m 100m 10m 10m

Location: 37°46'30"N, 122°25'10"W (San Francisco area), 10m altitude.

LOC Record Fields

Field Description Example
Latitude Degrees minutes seconds N/S 37 46 30.000 N
Longitude Degrees minutes seconds E/W 122 25 10.000 W
Altitude Height above sea level 10m
Size Diameter of location sphere 100m
Horizontal Precision Lat/long accuracy 10m
Vertical Precision Altitude accuracy 10m

Use Cases

While LOC records are rarely used in practice, potential applications include:

  • Data center locations — Document server physical locations
  • Geographic routing — (Theoretical) route to nearest server
  • Network documentation — Record equipment locations
  • Mapping applications — Display server locations on maps

Example Locations

; Company headquarters
hq.example.com.    LOC    40 44 55 N 73 59 10 W 50m

; Data center
dc1.example.com.   LOC    37 46 30 N 122 25 10 W 10m

; European office
eu.example.com.    LOC    51 30 26 N 0 7 39 W 15m

Why LOC Records Are Rare

  • Privacy concerns — Revealing physical locations may be undesirable
  • Limited application support — Few applications query LOC records
  • Better alternatives — Geographic routing uses other methods (anycast, GeoDNS)
  • Dynamic infrastructure — Cloud/CDN makes fixed locations less relevant

LOC Record Best Practices

  • Consider privacy — Think carefully before publishing precise locations.
  • Use for documentation — More useful for internal documentation than routing.
  • Keep updated — Remove records if equipment moves.
  • Be accurate — If using LOC, ensure coordinates are correct.

Querying LOC Records

# Using dig
dig example.com LOC

# Using host
host -t LOC example.com

Check Your LOC Records

Use our DNS Record Finder to look up LOC records for any domain.

Look Up LOC Records →

Related Record Types