DNS Record Types

Posted by

A common statement is domain name system (DNS) is used to covert the domain name into IP address. That true but not complete truth. DNS servers hold different records related to domain which can be used by others over the internet. These records are called resource records. Resource records help internet users to obtain essential for a domain. It is must for managing websites, email services, or maintaining any other online resources. Followings are most commonly used DNS records types explained.

DNS record types

1. A Record (Address Record)

A record is the common type of DNS record. It maps a domain name to an IPv4 address. This helps users to access a website using a easy to remember URL. For example, when you type www.wintelhive.com into your browser, the DNS server checks the A record to convert it into corresponding IP address. At the time of writing this article www.wintelhive.com is resolving to 63.250.43.131. As a result of this when we type www.wintlhive.com in browser. It will initiate a session with 63.250.43.131 address and website will be loaded.

While creating a DNS A record, time to live is (TTL) is also provided. TTL tells DNS client how long they should keep this record in their cache. So that they do not nee to come frequently to DNS server. Once the TTL is expired, cache is deleted and fresh query is sent to DNS server once again.

2. AAAA Record (Address Record IPV6)

The AAAA record is same as that of A record. But converts a domain name to an IPv6 address. So far IPV4 is standard internet and corporate protocol. IP V6 address is not very commonly used so you may not need to create in most of the cases. It has also TTL associated with it.

3. CNAME Record (Canonical Name)

Like A record, CNAME records or alias is another name that points to the backend IP address. domain names, allowing multiple domain names to point to the same IP address. If you want web.wintelhive.com to resolve to the same IP address as that of www.wintelhive.com. You will crate a CNAME web.wintelhive.com and point it to www.wintelhive.com. However you can have only one CNAME for each record.

4. MX Record (Mail Exchange Record)

MX records helps sending mailing system to route emails towards destination server. For example, if some send an email to user@wintelhive.com. His mailing server will query DNS server of wintelhive.com to find MX recorded. Later the MX record will be converted to IP address through A record. Once the IP address is resolved, email is routed toward that IP address. To completely understand MX record, you need to know the priority of MX as well. When you have more than one MX records, priority tells which one should be tried first and which to be tried in the last.

5. TXT Record (Text Record)

TXT record is a much broader term. It can store various types of text data. This text data can be used for different purpose like domain verification and email security etc. There is no single answer to this. As an example, google uses TXT records to verify your domain. Another implementation of TXT record is Sender Policy Framework (SPF). DomainKeys Identified Mail (DKIM) also a use case done through TXT records.

Lets take a example of SPF record. A TXT of wintelhive.com may include a string like “v=spf1 include:_spf.wintelhive.com ~all”. This is a guideline for others to understand which mail servers are allowed to send emails on behalf of the wintelhive.com. So they can accept or deny email and handle email SPAM efficiently.

6. NS Record (Name Server Record)

NS records indicates the authoritative name servers for a domain. These servers are responsible for answering DNS queries for your domain. All others are non authoritative servers. For example while writing this article if we query NS record of wintelhive.com we will have following response,

  • dns1.registrar-servers.com
  • dns2.registrar-servers.com

Note: If you try it yourself you may find 4 NS records instead of two. Don’t get confused. It may show two extra servers for IPv6.

7. SOA Record (Start of Authority Record)

The SOA record contains vital administrative information about a domain, such as the primary name server. An SOA record can be created or modified only one primary or mast DNS server only. Following are the key information that you may find in SOA record.

  • MNAME: This tells the primary name server of a domain. For example wintelhive.com SOA record is dns1.registrar-servers.com.
  • RNAME / Responsible Person: This tell the email address of DNS administrator. For example RNAME for wintelhive.com is hostmaster.registrar-servers.com. (It does not look like a valid email address. In the language or DNS hostmaster.registrar-servers.com means hostmaster@registrar-servers.com)
  • Serial number: It is a big numeric number. Whenever a change is made in primary (master) DNS server. Serial number in incremented by 1. This tells secondary (salve) servers that there is new update and they need to sync and refresh themselves.
  • Refresh: It is the time in seconds that is used by the secondary servers. How long they should and then go back to primary server to update themselves. For example wintelhive.com has refresh interval 43200 (12 hours) . Which means dns2.registrar-servers.com will contact dns1.registrar-servers.com every 12 hours.
  • Retry: Incase secondary DNS can not fetch information from primary server while refresh, the retry intreval tells when it will retry. As an example of wintelhive.com its 3600 (1 hour). Which means if dns2.registrar-servers.com can not refresh itself after 12 hours. It will keep retrying itself after every passing hour.
  • Expire: Incase secondary server keeps retrying but can not reach primary DNS server for a very long period of time, it will assume primary DNS is no longer active and expired. If we take the example of wintelhive.com expiry is set to 604800 (7 days).

8. PTR Record (Pointer Record)

PTR records are used for reverse DNS lookups. It converts an IP address back to a domain name. For instance, if a mail server receives a request from the IP address 142.250.190.78, it can use the PTR record to verify that this IP corresponds to mail.yourdomain.com. This is important for security and spam prevention in email systems.

9. SRV Record (Service Record)

SRV records define the location of specific services within a domain. Usually custom application/services require SRV recorded. In SRV records the server and port number for the service are mentioned. So that if the application need to reach to that it will query the SRV record for the DNS. An example of SRV record is Microsoft KMS server. Client find KMS through DNS SRV record for windows activation purpose.

For better explanation and we have created two SRV “_http._tcp.wintelhive.com”to SRV records in our DNS servers with different priority, weight and hosts. All other parameters are same.

These SRV DNS records contain following information.

  • Domain: It’s clearly a domain name for which SR record is created.
  • Service: It represents the service name in our case its http.
  • Protocol: It represents the protocol that is used. In our example it s TCP.
  • Priory: When you create more than one SRV records. Priority which server will be contacted first. In our example serer5 has priority 1 and server6 has priority 6. So server5 will be contacted first and will receive more traffic. If it is not reachable
  • Weight: Weight is simply second level of priority. If both records have same priority then high wight record will be used first. Lets assume both servers have same priority, server6 will be selected first since it has high weight. Please remember incase of priority low number means more traffic where as in case of wight higher number will attract more traffic.
  • Port Number: Port that will be used to serve the service. In our example its 80 (HTTP).
  • Host/Server Offering this service: In our example its server5.wintelhive.com and server6.wintelhive.com

10. CAA Record (Certification Authority Authorization Record)

CAA records add an additional layer of security by specifying which certificate authorities (CAs) are allowed to issue SSL certificates for which domain. For instance, Google might have a CAA record that only allows certain trusted CAs to issue certificates for google.com. This helps prevent unauthorized issuance of certificates. Any certificate issue by any authority other than mentioned in CAA record will be considered as illegit certificate and must not be trusted.

Above mentioned DNS record types list does not includes all. There are more. But they are not frequently used. Consider looking other articles on DNS server if you want to take a deep dive into it and learn more about DNS.

  • DNS Propagation

    DNS Propagation

    DNS propagation. How it works. What you need to know. Key factors. How to plan it effectively. Myths and much more.

  • What is private DNS Server?

    What is private DNS Server?

    Private an public DNS server. Understand the use of private DNS. Its benefits. Use case and much more.

Leave a Reply

Your email address will not be published. Required fields are marked *