Networking / Beginners

Resource Records (RR)

A DNS resource record (RR) contains all the information about a domain name system. It defines all the attributes for a domain name such as an IP address or a mail route.

A DNS RR has six fields:

<NAME>, <TYPE>, <CLASS>, <TTL>, <RD Length>, and <RDATA>

These fields are explained in the following list:

  • Name. This field specifies the DNS name, also known as the owner name, to which the RR belongs.
  • Type. This field is a 2-byte value that specifies the type of the resource that is defined in the resource record. This field is necessary because a DNS name can have more than one type of RR.
  • Class. This defines the protocol family for the RR record. For example, IN, which stands for Internet.
  • Time To Live (TTL). This field is the time, in seconds, for which a name server can cache an RR. A zero TTL implies that a server should not cache the RR.
  • RD Length. This field is the RDATA field's length in octets.
  • RDATA. This field is a resource data field and is the value to which the entity specified in the NAME field maps. It is unique for each type of RR.

Common DNS Resource Records

Record TypeDescriptionUsage
AAn address recordMaps FQDN into an IP address. For example,
Mail IN A
Login IN A
PTRA pointer recordMaps an IP address into FQDN. For example,
1.100 IN PTR
NSA name server recordDenotes a name server for a zone. For example,
SOAA Start of Authority recordSpecifies many attributes concerning the zone, such as the name of the domain (forward or inverse), administrative contact, the serial number of the zone, refresh interval, retry interval, and so on.
CNAMEA canonical name recordDefines an alias name and maps it to the absolute (canonical) name. For example,
MXA mail exchange recordUsed to redirect e-mail for a given domain or host to another host. For example, IN MX 0
[Previous] [Contents] [Next]