DNS Record Types Explained: A, AAAA, CNAME, MX, TXT, NS and PTR

The Domain Name System (DNS) uses different record types to describe how domain names should be handled.

Some DNS records connect a hostname to an IP address, while others identify mail servers, authoritative name servers, aliases, verification information, or reverse DNS mappings.

Quick answer: A records point to IPv4 addresses, AAAA records point to IPv6 addresses, CNAME records create aliases, MX records identify mail servers, TXT records store text-based information, NS records identify authoritative name servers, and PTR records are commonly used for reverse DNS lookups.

What is a DNS record?

A DNS record is an entry stored in the Domain Name System that provides information about a domain or hostname.

When a DNS resolver receives a query, it can request a particular record type depending on the information needed.

For example, a browser trying to reach a website may need an A or AAAA record, while an email system may request an MX record.

If you want a broader explanation of the DNS system first, read What Is DNS? .

Common DNS record types

Record Main purpose Example
A Hostname to IPv4 address 192.0.2.10
AAAA Hostname to IPv6 address 2001:db8::10
CNAME Alias to another hostname www.example.com → example.net
MX Mail server for a domain mail.example.com
TXT Text-based information and verification SPF or verification text
NS Authoritative name server ns1.example.net
PTR Reverse IP-to-hostname mapping 192.0.2.10 → host.example.com

What is an A record?

An A record, or Address record, maps a hostname to an IPv4 address.

For example:

example.com → 192.0.2.10

When a client asks for the A record of a hostname, DNS can return the IPv4 address associated with that name.

A records are among the most commonly used DNS records for websites and internet services using IPv4.

Can a hostname have more than one A record?

Yes.

A hostname can have multiple A records pointing to different IPv4 addresses.

This can be used as part of:

  • load distribution,
  • redundancy,
  • multi-server hosting,
  • or geographic service architectures.

What is an AAAA record?

An AAAA record maps a hostname to an IPv6 address.

Example:

example.com → 2001:db8::10

AAAA records serve a similar purpose to A records, but they are used with IPv6 rather than IPv4.

A hostname may have both A and AAAA records when a service supports both address families.

Learn more about the two addressing systems in IPv4 vs IPv6 .

Why is it called an AAAA record?

An IPv6 address is four times the size of an IPv4 address: 128 bits compared with 32 bits.

The record name AAAA reflects the historical relationship with the IPv4 A record.

What is a CNAME record?

A CNAME, or Canonical Name record, makes one hostname an alias of another hostname.

Example:

www.example.com → example.hosting-provider.net

Instead of assigning an IP address directly to www.example.com, the CNAME tells DNS that the client should continue resolving the canonical hostname.

Why use a CNAME?

CNAME records are useful when a service provider wants customers to point a hostname toward infrastructure whose IP addresses may change.

They are commonly used for:

  • website hosting platforms,
  • content delivery networks,
  • software-as-a-service platforms,
  • verification hostnames,
  • and service aliases.

Is a CNAME the same as an A record?

No.

An A record points directly to an IPv4 address.

A CNAME points to another hostname, which is then resolved separately.

Record Points to
A IPv4 address
CNAME Another hostname

Can a CNAME coexist with other records?

In normal DNS usage, a name configured as a CNAME should not also contain unrelated DNS data at that same name.

This is one reason CNAME records are often used for subdomains such as www rather than directly at the root of a domain.

What is an MX record?

An MX record, or Mail Exchange record, tells email systems which mail servers accept messages for a domain.

Example:

10 mail1.example.com

The number is the MX preference or priority value.

When multiple MX records exist, lower preference values are normally tried before higher values.

Why can a domain have multiple MX records?

Multiple MX records can provide backup mail servers or distribute email handling across multiple systems.

For example:

10 mail1.example.com
20 mail2.example.com

In this example, the server with priority 10 is normally preferred.

Does an MX record point directly to an IP address?

MX records identify mail-server hostnames rather than directly containing the destination IP address.

The mail-server hostname can then be resolved using its own A or AAAA records.

What is a TXT record?

A TXT record stores text associated with a DNS name.

TXT records are widely used for purposes such as:

  • domain ownership verification,
  • email authentication,
  • service configuration,
  • security policies,
  • and other machine-readable information.

What is SPF?

SPF, or Sender Policy Framework, commonly uses a TXT record to describe which servers are authorized to send email for a domain.

A simplified SPF record might look like:

v=spf1 include:example.net -all

Real SPF configurations vary according to the mail services being used.

What are DKIM and DMARC?

Email systems also use DNS records for technologies such as DKIM and DMARC.

DKIM public keys are commonly published through DNS, while DMARC policies are typically stored in TXT records under a specific hostname.

These technologies help receiving mail systems evaluate whether messages claiming to come from a domain are properly authenticated.

What is a domain verification TXT record?

Many online services ask domain owners to create a TXT record containing a unique verification value.

If the service can read that value from DNS, it can confirm that the user has control over the domain's DNS configuration.

Search engines, email platforms, cloud services, and security providers may use this type of verification.

What is an NS record?

An NS record, or Name Server record, identifies a DNS server that is authoritative for a DNS zone.

Example:

example.com → ns1.example.net

A domain normally has more than one authoritative name server for redundancy.

What does authoritative DNS mean?

An authoritative DNS server holds or serves the official DNS information for a zone.

Recursive resolvers eventually contact authoritative infrastructure when they need information that is not already available from cache.

What happens when nameservers are changed?

Changing the authoritative nameservers changes which DNS provider is responsible for serving the zone.

The new provider must contain the required DNS records before the transition is completed, otherwise services such as websites and email may stop resolving correctly.

What is a PTR record?

A PTR record, or Pointer record, is commonly used for reverse DNS.

Ordinary forward DNS usually asks:

Hostname → IP address

Reverse DNS asks:

IP address → Hostname

Who controls PTR records?

PTR records are normally controlled by the organization responsible for the IP address range rather than by whoever controls the ordinary forward DNS zone for a domain.

For residential IP addresses, this is often the ISP.

For hosting or cloud servers, the hosting provider may provide a control panel or support process for configuring reverse DNS.

Why is reverse DNS important for email?

Mail systems may examine reverse DNS as one of several signals when evaluating a sending server.

A properly configured mail server often has a meaningful PTR record that corresponds with its server identity.

Reverse DNS alone does not guarantee successful email delivery, but poor or missing configuration can contribute to reputation or validation problems.

What is TTL in DNS?

TTL stands for Time to Live.

It tells DNS resolvers how long a DNS record may generally be cached before a fresh copy should be requested.

A shorter TTL can make changes visible to recursive resolvers sooner after their cached copy expires, while a longer TTL can reduce repeated DNS queries.

Does a low TTL make DNS changes instant?

No.

A resolver may already have cached the previous record under the old TTL.

Changing the TTL now does not retroactively shorten the expiration time of copies already cached elsewhere.

Why do DNS changes take time?

Different resolvers can hold cached records until their TTL expires.

This is why two users can temporarily receive different answers after a DNS change.

If your own device continues using an outdated result, you can read: How to Flush DNS Cache on Windows, macOS, and Chrome .

How to check DNS records

IPScope includes a DNS Lookup tool that can query common record types.

Open the IPScope Network Toolbox and enter a domain name to inspect its DNS information.

Why might two DNS tools show different answers?

Differences can occur because:

  • the tools use different recursive resolvers,
  • one resolver still has an older record cached,
  • the DNS provider recently changed a record,
  • responses vary by location or network,
  • or the domain uses traffic-management services.

DNS records and CDNs

Content delivery networks often use DNS as part of directing visitors toward suitable infrastructure.

A domain may use:

  • CNAME records pointing toward a CDN hostname,
  • multiple A or AAAA records,
  • or provider-specific DNS features.

The exact configuration depends on the CDN and DNS provider.

DNS record troubleshooting checklist

If a domain is not working as expected, check:

  1. Are the authoritative NS records correct?
  2. Does the hostname have the expected A or AAAA record?
  3. Is a CNAME pointing to the correct hostname?
  4. Are MX records configured correctly for email?
  5. Are required TXT verification records present?
  6. Has the previous TTL had enough time to expire?
  7. Are you looking at cached DNS information?

DNS record FAQ

Which DNS record points a domain to an IPv4 address?

An A record.

Which DNS record points a domain to an IPv6 address?

An AAAA record.

Which DNS record is used for email servers?

MX records identify mail servers responsible for receiving email for a domain.

Which DNS record is used for aliases?

A CNAME record creates an alias from one hostname to another hostname.

Which record is commonly used for domain verification?

TXT records are commonly used for domain ownership and service verification.

Which DNS record controls reverse DNS?

PTR records are used for reverse mappings from IP addresses to hostnames.

Can one domain use several DNS record types?

Yes. A normal domain can simultaneously use A, AAAA, MX, TXT, NS, and many other records for different services.

Key takeaway

DNS records perform different jobs. A and AAAA records connect hostnames to IP addresses, CNAME records create aliases, MX records direct email, TXT records carry verification and policy information, NS records identify authoritative DNS servers, and PTR records provide reverse DNS mappings. Understanding these records makes DNS troubleshooting much easier.

Related IPScope guides

Start with What Is DNS? for an overview of the Domain Name System.

Learn how DNS results ultimately connect to network addresses in What Is an IP Address? .

Compare the two main IP address families in IPv4 vs IPv6 .

If you are troubleshooting an outdated DNS result, read How to Flush DNS Cache on Windows, macOS, and Chrome .

Or use the IPScope DNS Lookup to inspect current DNS records.

Popular posts from this blog

Woven Star Quilt Pattern

Crescent Moon Black Cat Cross Stitch Pattern

How to Find Your Router IP Address on Windows, Mac, Android, and iPhone