/
/
DNS resource records and what they are used for

DNS resource records and what they are used for

Why?

DNS (Domain Name System) resource records play an important role in translating domain names into the corresponding network addresses. They determine how requests for a domain should be processed and routed on the network.

In this article, we will look at the different types of DNS resource records and their basic purpose.

Understanding and using DNS resource records is essential for properly routing network traffic and ensuring that domain names are associated with their corresponding IP addresses. This allows you to match a domain name, such as example.com, with the IP address of the server where the information about that domain is stored, allowing you to access websites, mail servers, and other Internet resources.

Knowledge of DNS resource records is also useful for configuring, maintaining, and managing network infrastructure, as well as for detecting and troubleshooting problems with resource availability on your network.

Instructions

A-record (IPv4 address)

An A-record is used to associate a domain name with an IPv4 address. It allows you to establish correspondence between the domain name and the IP address of the server.

For example:

example.com.    IN A 192.0.2.1.

In this example, the domain name "example.com" is associated with the IPv4 address "192.0.2.1".

 

AAAA-record (IPv6-address)

An AAAA record is similar to an A record, but is used to associate a domain name with an IPv6 address. It lets you establish correspondence between the domain name and the IP address of an IPv6 server.

Example:

example.com.    IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334

In this example, the domain name "example.com" is associated with the IPv6 address "2001:0db8:85a3:0000:0000:0000:8a2e:0370:7334".

 

CNAME record (canonical name)

A CNAME record is used to create an alias or canonical name for an existing domain name. It allows you to establish correspondence between one domain name and another domain name.

For example:

www.example.com.    IN CNAME example.com.

In this example, the subdomain "www.example.com" points to the main domain name "example.com".

 

MX-record (mail server)

An MX record defines the mail server that will handle email for a specific domain. It allows email messages to be sent to the correct mail server.

Example:

example.com.    IN MX 10 mail.example.com.

In this example, email messages for the domain "example.com" will be routed to the mail server "mail.example.com".

 

TXT-record (textual information)

A TXT record is used to store arbitrary textual information about a domain. It can contain various types of data such as an SPF (Sender Policy Framework), DKIM (DomainKeys Identified Mail), and others.

Example:

example.com.    IN TXT "v=spf1 mx -all".

In this example, the TXT record defines the SPF policy for the domain "example.com."
 

NS-record (server name)

The NS record points to the name servers responsible for managing the domain name. It identifies the authoritative DNS servers for the domain.

Example:

example.com.    IN NS ns1.example.com.

example.com.    IN NS ns1.example.com.

    In this example, the NS record specifies that the name servers "ns1.example.com" and "ns2.example.com" are authoritative servers for the domain example.com.
 

PTR-record (reverse lookup name)

A PTR record is used to associate an IP address with a domain name. It allows a reverse lookup to determine the domain name associated with a particular IP address.

Example:

1.2.3.4.in-addr.arpa.    IN PTR example.com.

In this example, the PTR record associates the IP address "4.3.2.2.1" with the domain name "example.com".

TAKE NOTE!

This record is specified on the IP address provider side, usually by the hosting provider

 

SOA record (start of authority record for the authoritative zone)

An SOA record defines the authoritative zone settings, such as primary name servers, the responsible party's email address, and other settings. It is the start record for each DNS zone.

Example:

example.com.    IN SOA ns1.example.com. admin.example.com. (

                   2024010101 ; serial number

                   3600 ; reboot time

                  1800 ; repetition time

                   604800 ; expiration time

            86400 ; minimum lifetime

            )

In this example, the SOA record defines the primary name servers (ns1.example.com), the responsible person's email address (admin.example.com), and other parameters for the "example.com" domain.

 

SRV record (service index)

An SRV record is used to indicate the location of a service on the network. It allows clients to find the appropriate server to execute a particular service.

Example:

_service._tcp.example.com.    IN SRV 0 0 0 5060 server.example.com.

In this example, the SRV entry indicates that the service "_service._tcp.example.com" is available on the server "server.example.com" on port 5060.

 

CAA record (validation of certification centers)

A CAA record allows domain owners to control which certificate authorities can issue SSL certificates for their domain.

Example:

example.com. CAA 0 issue "letsencrypt.org"

DNS resource records play an important role in ensuring that network services work properly and that the domain names are associated with their corresponding addresses.