DNS Record Types

DNS records come in a variety of distinct forms. The most prevalent are :

TypeDescription
NSThe Name Servers for a domain are specified in this record.
AThis entry links a name to an IPv4 address.
AAAAThis entry links a name to an IPv6 address.
SOAFor the zone, this marks the beginning of authority. The name server is designated as authoritative for this zone by this. The TTL (Time To Live) and a serial number are two additional pieces of information that are included.
MXThe domain's mail server's name can be found in an MX record.
CNAMEA canonical name is a name that is used as an alternative to another name. In order to continue the DNS procedure for the name that the CNAME record points to, the name server must return the CNAME record.
PTRThis leads to a different name. In contrast to CNAME, the PTR record is returned without any additional resolution.
TXTSPF (Sender Policy Framework) records, for example, regularly employ this information, which is typically human readable. Some mail servers make use of the SPF (Sender Policy Framework) to aid in the detection of spam emails.
SPFA more recent substitute for SPF data kept in a TXT record is this.

DNS Resolution

How is an IP address for www.yourdomain.com determined?

Your DNS client first makes contact with the internet's root DNS servers while doing a DNS lookup.

When requesting a name resolution, the DNS client will choose one of the root DNS servers.
A list of DNS servers in charge of the.com zone is returned by the root DNS server after examining the last component of the domain name (.com).

After selecting one of these DNS servers, the DNS client will ask it to resolve the domain name.

A list of DNS servers in charge of the.yourdomain.com zone will subsequently be provided by the DNS server. These are the name servers that belong to yourdomain.

After selecting one of these, the DNS client will ask it to resolve the domain name. Actually knowing the A record for www.yourdomain.com, this DNS server ought to provide it to the DNS client.

DNS Server

DNS Zone

Traversal Description
Root serversAllreturns a list of name servers for the.com domain that are authoritative.
GTLD servers.comreturns a list of name servers for.yourdomain.com that are authoritative.
Yourdomain's servers.yourdomain.comthe A record for www.yourdomain.com is returned

TTL (Time To Live) values are assigned to each DNS record. The duration of this record's validity is determined by this value. The initial DNS server will return the same response if a second request is made and the TTL has not yet run out without going all the way down to the root servers. By doing this, the volume of requests that DNS servers must process is reduced.


How to check a [CNAME] Record?

Use the

dig
command, to check [CNAME] Record:

$ dig CNAME www.example.com +short
example.com.