DNS Records

Record created on DNS server for domain
Record Type Description
A Record 4byte-IP to hostname mapping. Every internet have 1 or more IP addresses. All are returned.

# host A google.com;  dig hostname;  nslookup hostname
            
AAAA Record 128bit-IPv6 to hostname map. (google.com, 2404:6800:4003:c00::65)
ALIAS Record Works at the root (apex) domain (e.g., example.com). This domain(example.com) can point to another hostname(eg: best.com) So if someone types example.com in browser, he will see contents of best.com

example.com ---points to--> best.com
            
CAA(Certificate Authority Authorization) Record Domain owners specify which Certificate Authorities (CAs) are allowed to issue SSL/TLS certificates for their domain
If no CAA record exists, any CA can issue a certificate; but if a CAA record is present, only the CAs listed within it are permitted

Type Name Priority Content                 TTL
CAA	  @	    0	      0 issue "amazon.com"	 300
            
CNAME(Canonical Name) Record Stores Alternate name(alias) of domain.

test.com 86400 IN CNAME test1.com     //test.com and test1.com both belongs to same host.
# host    -v    -t  A ca.example.com
            
MX Record (Value 15) Host responsible for handling incoming mails for zone. A preference value and the host name for a mail server/exchanger that will service this zone.
NS(name server) record (Value 2) Defines Name server for domain or subdomain.
PTR record(Value 12) For Reverse Lookup. We need to create PTR record for each IP Address. This Stores hostname corresponding to reverse-dns-name.
Resource Records / RR Data/Information about particular domain. For single host most common resource record is IP Address.

DOMAINNAME    TIMETOLIVE(sec)    CLASS(IN:for internet)    TYPE_OF_RR    VALUE

DOMAINNAME: Domain to which this RR applies. 
Each domain can have RRs of multiple domains. 
This filed is primary search key for search.
TTL: How stable RR is. Eg: 86400(1 day)
VALUE: Value of RR can be Number, domain name or string.
            
SOA(Start of Authority) (value 6) Provides name of primary source of information about name server’s zone. Eg(Email of admin etc).

# host -v -t SOA example.com
            
SPF record Which machines in domain are authorized to send/receive Email in domain. This helps in identifying junk/forged mails.
SRV record (Value 33) Defines services available in domain. Example, ldap, http, sip etc.

DNS Client                                              DNS-Server
# host -v  -t SRV _ldap._tcp.example.com;
dig SRV _ldap._tcp.lab.example.net;
                            <- 389    server0.example.com---
            
TXT record (value 13) Human readable information associated with domain name.

spf1 ip4:72.51.34.34 ip4:70.33.254.29 -all--