Types of DNS Records with Examples
A record
The A record is the most common form of DNS record. An A record points to an IP address for a website or domain name.
A record’s primary application is for IP address lookups. A web browser can load a webpage using the domain name by using an A record. We can therefore access websites on the Internet even though we don’t know their IP addresses.
For example, if you can have an A record for www.example.com that points to its hosting server’s IP address 192.168.0.1
AAAA Record
AAAA records are part of the IPv6 protocol, which means they are used to assign IPv6 addresses to hosts on the Internet. They can be used to assign an IPv6 address to a hostname (the name of a computer or device) or a hostname to an IPv6 address.
This ability makes them incredibly useful for network administrators who want to assign their devices with custom IPv6 addresses without having to worry about the long strings of numbers that come with addresses like 2001:db8:0:0:0:0:16d9:a5b3 or 2001:db8:8c3f::17e9/128.
AAAA is similar to A records, other than that it stores the more recent IPv6 addresses instead of IPv4. It’s also required for every website hosted on the Internet that uses IPv6.
AAAA records point to IPv6 addresses like: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
CNAME Record
CNAME records are used to create aliases for your domain. For example, if you have a website at www.example.com, you can use a CNAME record to set up an alias such that if someone types in www.example.com/blog, they’ll actually be taken to blog.example.com—instead of being taken to the root domain itself (www.example.com).
You can also use CNAME records to set up redirects between different versions of your website or app or between different subdomains on the same site.
Users can create a CNAME record for their domain www.example.net pointing to the server www.example.com:
www.example.net. IN CNAME www.example.com.
Nameserver (NS) Record
This record identifies the nameservers for a domain name. It is added to the zone file when you add a new domain to your account and must be set up correctly before creating any other records for that domain.
They tell others on the internet what nameservers you’re using to resolve domain names, making them an essential part of virtually every domain name system (DNS) configuration. NS records help users find their way around the web by providing an authoritative source for DNS information.
The following is an example of a nameserver (NS) record:
example.com NS ns1.example.com
Mail exchange (MX) Record
An MX record specifies the mail servers responsible for accepting email messages sent to a domain name. This kind of record is required if you want to receive email through your domain and Points to an A record or AAAA record that identifies one or more IP addresses on which your mail server(s) are hosted.
The following is a mail exchange (MX) record example for Google’s mail servers:
IN MX 10 aspmx.l.google.com.
TXT Record
It is a type of DNS record that allows you to add additional information about your domain in a textual format. They are typically used in email security and authentication practices
The TXT record’s purpose is to instruct the receiving server on how to validate the mail servers’ source information. The primary method employed by mail servers to demonstrate the validity of an email, particularly for SPF authentication, is the SPF TXT record.
Example of a TXT record:
v=spf1 include:_spf.google.com ~all
SOA Record
All domains use the Start of Authority records to specify their primary name server, the authoritative source for information about the zone, and responsible for the overall operation of the domain. This includes the email address and webmaster contact information.
This is an example of an SOA record for the domain name “example.com”:
ns1.domainname.com admin.domainname.com 21421331021 78403 6410 580402 300
SRV Record
A service record is used to specify a server’s location (hostname),providing a specific service in the network.
Here is an SRV record for a mail server:
_sip._tcp SRV 5 0 5060 servername.example.com.
- What is SPF? Free2 m
- Video Introduction to SPF Free1 m 41 s
- A Brief History of SPF Free1 m
- How does SPF work? Free2 m
- SPF Tags: Syntax of an SPF Record Explained Free3 m
- How to create and publish SPF records? Free2 m
- SPF Authentication Failures Free3 m
- Video Explanation: SPF PermError Free1 m 39 s
- Quiz 430 m
- What is DMARC? Free1 m
- Video Introduction to DMARC Free1 m 15 s
- A Brief History of DMARC Free1 m
- How does DMARC work? Free2 m
- What is DMARC Policy? : None, Quarantine & Reject Free2 m
- Video Explanation: DMARC Policy Free1 m 40 s
- DMARC Tags Free2 m
- DMARC Aggregate (RUA) Reports Free3 m
- DMARC Forensic (RUF) Reports Free2 m
- How to Create and Publish a DMARC Record? Free3 m
- DMARC Authentication Failures Free3 m
- Video Explanation: Why does DMARC Fail? Free1 m 37 s
- Quiz 630 m