What Are DNS Record Types (A, MX, TXT, CNAME)?

What Are DNS Record Types (A, MX, TXT, CNAME)?

DNS records play a crucial role in ensuring a domain works properly on the internet. Opening a website, delivering emails to the correct server, and performing various verification processes are all made possible through DNS records. In this article, we explain the most commonly used DNS record types: A, MX, TXT, and CNAME in a simple and understandable way.

📚 What Is a DNS Record?

DNS (Domain Name System) is the system that translates domain names into IP addresses. While people use domain names such as whoiscan.com, internet infrastructure identifies these domains through IP addresses.

DNS records are technical entries that determine which server a domain points to, which mail server handles its emails, or which verification information is used.

🖥️ What Is an A Record?

An A record (Address Record) maps a domain or subdomain to an IPv4 address. It is one of the most fundamental DNS record types and is usually required for a website to function.

For example, when a user types whoiscan.com into their browser, the DNS system uses the A record to determine which IP address the domain should point to.

Example:
whoiscan.com → 192.0.2.1

Common uses of A records:

  • Connects a website to a server IP address.
  • Defines the hosting server where the domain is located.
  • Ensures basic website accessibility.

📨 What Is an MX Record?

An MX record (Mail Exchange) specifies which mail server receives emails for a domain. It must be configured correctly for corporate or custom email services to work properly.

MX records are usually defined with priority values. The lower the priority number, the higher the priority of the mail server.

Example:
10 mail.whoiscan.com

Common uses of MX records:

  • Manages the domain’s email infrastructure.
  • Ensures incoming emails reach the correct server.
  • Integrates with services like Google Workspace or Microsoft 365.

📝 What Is a TXT Record?

A TXT record (Text Record) is used to store text-based information in DNS. It is especially important for domain verification and email security.

Email security mechanisms such as SPF, DKIM, and DMARC are commonly configured using TXT records. Additionally, services like Google Search Console, CDN platforms, and other tools require TXT records for domain verification.

Example:
v=spf1 include:_spf.google.com ~all

Common uses of TXT records:

  • Verifies domain ownership.
  • Supports security configurations like SPF, DKIM, and DMARC.
  • Helps prevent email spoofing.

🔗 What Is a CNAME Record?

A CNAME record (Canonical Name) maps a domain or subdomain to another domain name. Instead of pointing directly to an IP address, it references another host name.

It is frequently used for www subdomains, CDN integrations, and third-party service connections.

Example:
www.whoiscan.com → whoiscan.com

Common uses of CNAME records:

  • Redirects subdomains to another host name.
  • Simplifies domain management.
  • Commonly used with SaaS platforms and CDN services.

⚖️ Differences Between A, MX, TXT, and CNAME Records

  • A Record: Connects a domain to an IP address.
  • MX Record: Directs emails to a mail server.
  • TXT Record: Stores text data for verification and security.
  • CNAME Record: Redirects one host name to another.

🛠️ When Should Each DNS Record Be Used?

  • If you want to connect your website to a server → A record
  • If you want to enable email services → MX record
  • If domain verification or email security is required → TXT record
  • If you want to redirect a subdomain to another domain → CNAME record

⚠️ Important Note

CNAME records are generally used for subdomains rather than the root domain. For root domains, A records are typically preferred. Also, assigning both a CNAME record and other record types to the same host may cause technical conflicts.

❓ Frequently Asked Questions

Can a website work without an A record?

In most cases, no. A domain needs an A record to connect to a server’s IP address. Some advanced setups may use alternative configurations, but A records remain the most common solution.

Can emails be received without an MX record?

No. Without an MX record, email servers cannot determine where incoming emails should be delivered.

Are TXT records only used for verification?

No. TXT records are also used for email security configurations such as SPF, DKIM, and DMARC.

Can a CNAME record point to an IP address?

No. A CNAME record must point to another domain name, not directly to an IP address.

📌 Conclusion

DNS record types are fundamental components that determine how a domain operates on the internet. An A record connects a website to a server, an MX record manages email flow, a TXT record is used for verification and security, and a CNAME record enables domain redirection.

If you want to analyze DNS records, check domain configurations, or detect technical issues, you can use the tools available on whoiscan.com.