You are here
What are the types of DNS record？
The DNS server is responsible for converting domain name into IP addresses so that users can use domain names to directly access the Internet without having to remember complex IP number strings. This correspondence between domain names and IP addresses based on DNS is called "DNS records".
The most common types of DNS record are as follows:
- A record: "A" stands for "address". A record is the most basic type of DNS record. According to RFC 1035, A record is an important record for name resolution, which maps a specific host name (or domain name) to the IP address of the corresponding host. Therefore, simply put, the A record is the IP address corresponding to the specified domain name.
- AAAA record: According to RFC 3596, the AAAA record is also used to map a specific host name (or domain name) to the IP address of the corresponding host. The AAAA record is conceptually similar to the A record, but it allows you to store a domain's IPv6 address, rather than the IPv4 address.
- CNAME record:The Canonical Name Record. According to RFC 1035, the CNAME record is used to point an alias to an A record, so that there is no need to create a new A record for a new name.
- MX record:The Mail Exchange record. According to RFC 1035, the MX record points to a mail server, which is used to locate the mail server according to the address suffix of the recipient when the email system sends mail. For example, when someone wants to send a letter to firstname.lastname@example.org, the sender's mail system looks up the MX record for mydomain.com through DNS. If the MX record exists, the email will be send out to the mail server specified by the MX record.
- NS record:The Name Server record. According to RFC 1035, NS records are used to delegate a DNS server domain name resolution. The DNS server NS record generally appear in the form of ns1.domain.com, ns2.domain.com, etc.
- SRV record:The Service record. According to RFC 2782, SRV records are used to define the location of a server that provides a specific service, such as host, port, etc.
- PTR record:The Pointer record. According to RFC 1035, PTR records are used to map an IP address to a corresponding domain name, which is the exact opposite of an "A" record. PTR records are mainly used for mail servers. For example, someone using ABC@163.com sends an email to email@example.com. When the gmail mail server receives this email, it will check the header of the email where shows the email is sent from which IP address, then perform reverse DNS lookup according to this IP address. If the queried domain name is 163.com, the email will be accepted. If the domain name isn’t 163.com, then the email will be rejected.
- TXT record:The Text record. According to RFC 1035, TXT record is the description of text information provided for a host name or domain name. One of its important functions is to set SPF (Sender Policy Framework) record to help identify the email sender and prevent others from impersonating your identity to send emails.
In addition, there are many less commonly used records, such as: AFSDB, APL, CAA, CDNSKEY, CDS, CERT, DHCID, DLV, DNAME, DNSKEY, DS, HIP, HTTPS, IPSECKEY, KEY, LOC, NAPTR, NSEC, OPENPGPKEY, RRSIG, SIG, SOA, SPF, SSHFP, TSIG, URI, etc.
Click to view: Full List DNS Record Types
Furthermore, TTL is very common in DNS records. TTL means Time-To-Live, which represents the time that the DNS record is cached on the DNS server. For example, if the TTL of a DNS record is 86400 seconds, the record can remain valid on the DNS server for 24 hours.