What is a LOC record?

LOC records allow you to specify a physical location for a domain name. It contains Latitude, Longitude, and Altitude information as well as host/subnet physical size and location accuracy. This information can be queried by other computers connected to the Internet.

LOC record format

A typical LOC record looks like the following in standard BIND format:

$ORIGIN example.com.

@ 3600 IN  LOC 31.000 N 106 28 29.000 W 10.00m 1m 10000m 10m

Anatomy of the LOC Record looks like the below:

Host LabelTTLRecord TypeLatitudeLongitudeAltitude
example.com.3600LOC31.000 N106 28 29.000 W10.00m

Host Label

It defines the hostname of a record and whether the hostname will be appended to the label. Fully qualified hostnames terminated by a period will not append the origin.

TTL

The time-to-live in seconds. It specifies how long a resolver is supposed to cache or remember the DNS query before the query expires and a new one needs to be done.

Record Class

Mainly 3 classes of DNS records exist:

  • IN (Internet) – default and generally what the internet uses.
  • CH (Chaosnet) – used for querying DNS server versions.
  • HS (Hesiod) – uses DNS functionality to provide access to databases of information that change infrequently.

Was this article helpful?

Related Articles

Leave A Comment?