Name.com Blog
January 30, 2024

4 Types of DNS Records & When Do You Use Them

4 types of DNS records you should know about DNS records are an essential part of getting websites to operate correctly. They serve as a map that tells the DNS server (or the digital database that lists every website on the internet) which domain every IP address is associated with, and how they should be […]


4 types of DNS records you should know about

DNS records are an essential part of getting websites to operate correctly. They serve as a map that tells the DNS server (or the digital database that lists every website on the internet) which domain every IP address is associated with, and how they should be handled.

Introduction to DNS Records

DNS records, a crucial component of the Domain Name System (DNS), are essential for the proper operation of your website. These records act as a navigational guide, informing the DNS server – essentially a digital database listing every domain name on the internet – about the association between the domain name and its corresponding IP address. They also dictate how access requests, identified through a DNS lookup, should be processed.

Among the various DNS record types, certain strings serve as commands on how the server should approach them, and they ensure that your site functions the way you intend it to. Although there are various types of DNS records within the domain name system, these four record types are the most commonly used in DNS lookups and domain name associations.

1. A records

What is an A record?

Address records, commonly known as host records, resolve IP addresses. They connect the domains you register to the correct IP address so that your website will properly resolve when someone types in your web address.

When do you use an A record?

A records are used when you want to connect a domain name you’ve registered with a hosted website. Usually, two A records are set up that will successfully point to both a bare and wildcard version of the domain (i.e. yoursite.com and http://yoursite.com). Additional A records can also be created for subdomains as well.

2. CNAME records

What is a CNAME record?

CNAME records, or Canonical Name Records, only resolve to domains and subdomains. Unlike A records, they cannot be bare (i.e. there needs to be www. in front of them for the URL to properly resolve).

When do you use a CNAME record?

Why would you use a CNAME record instead of an A record? Well, CNAME records are most often used when you want to direct part of your website to an external link. For example, if you wanted to set up an eCommerce site to complement your existing website, a CNAME record would be the simplest way to link them together.

3. MX records

What is an MX record?

MX stands for Mail Exchange and is very different from other records. Unlike most DNS records that resolve to text or the destinations of various IP addresses, MX records are used to direct emails sent to custom addresses associated with a domain name.

When do you use an MX record?

If you want to create custom email addresses through your domain name, MX records must be set up so that any emails that go to that address will be directed to the right server and delivered to you. Typically, your email provider will give you the MX records you need, and then you’ll add it to the domain it’s associated with to finish the setup.

4. TXT records

What is a TXT record?

As you can probably guess, a TXT record is simply a text record. Although these records cannot be used to change your domain in any way, they are useful for making it easier to search for and find your domain.

When do you use a TXT record?

Text records are most often used by services like Google. By adding certain strings of characters to your TXT file, search engines and other services are able to search for your domain as well as verify that you are the owner of the domain.

Other DNS Record Types

In addition to the commonly known A and CNAME records, the Domain Name System encompasses a variety of other record types, each serving specialized functions. Here are other types of DNS Records and their uses:

  • AAAA Record: The AAAA record is used in the DNS to map a domain name to the IP address of a computer hosting that domain’s services, specifically for IPv6 addresses. Unlike the more common A record, which maps to IPv4 addresses, AAAA records ensure compatibility and connectivity in networks that use the newer IPv6 protocol.
  • NS Record: The NS (Name Server) record indicates which DNS server is authoritative for a particular domain. It’s essential for delegating a subdomain to a different DNS zone or for informing the internet where to find DNS information about your domain. This record plays a crucial role in the overall DNS infrastructure.
  • SOA Record: The Start of Authority (SOA) record holds essential administrative information about a domain, including the primary name server, the email of the domain administrator, and various timers related to refreshing the zone. It acts as a fundamental record in DNS, indicating authoritative information about a domain and guiding how DNS should handle changes.
  • PTR Record: The Pointer (PTR) record, often used in reverse DNS lookups, maps an IP address to a domain name, the opposite of what A or AAAA records do. It’s primarily used for verifying the legitimacy of an IP address, ensuring that the IP indeed corresponds to a particular domain, which is particularly useful for email servers to combat spam.
  • SRV Record: The Service (SRV) record identifies the hostname and port number for specific services within a domain, such as email, VoIP, or IM. It provides information on the location of servers for specific services, enabling the segregation and easy access to various services hosted on the same domain but potentially on different machines.
  • CERT Record: The CERT record in DNS is used to store encryption certificates—like PKIX, SPKI, PGP, and so forth—associated with a domain name. These records play a vital role in securing communications and authenticating entities within a domain, essential for secure email exchanges and other secure communications.
  • DHCID Record: The DHCP ID (or DHCID) record is used in DNS to provide a way to associate an IP address with the identifier of a DHCP client. This record is useful for preventing conflicts between DNS and DHCP and for supporting dynamic DNS updates, especially in networks with a mix of static and dynamic IP addresses.
  • DNAME Record: The DNAME (Delegation Name) record is used for DNS redirection, redirecting queries for a domain and all of its subdomains to a different domain. It’s like a broader version of the CNAME record, useful for domain migrations or consolidating multiple domain names under a single domain.

Unleash Your Web Potential with name.com Today!

Understanding the various types of DNS records, including common DNS records like A and CNAME, and more specialized ones such as AAAA, NS, SOA, PTR, SRV, CERT, DHCID, and DNAME, is crucial for anyone managing a website or an online presence. As a domain owner or someone working with a hosting provider, knowing these records, particularly the address record (A record), ensures that your website is accessible and functioning correctly. These DNS record types play a key role in defining how your domain interacts with the internet at large, encompassing aspects like email routing, domain security, and network services, all critical in handling a DNS query. Whether you’re setting up a new website with your hosting provider, managing an email server, or ensuring secure communication, being familiar with these DNS records and their functions is indispensable.

For more information and expert assistance in navigating the complexities of DNS records, visit name.com and explore our extensive resources and tools to help you manage your online presence effectively.

Share this article!