Example : 

How to set up an email or change my account settings.

What are the different DNS record types (A, CNAME, MX, TXT) and when to use each?

DNS records tell the internet where your website is hosted, where your emails should be delivered, and how to verify your domain’s identity. They work like a directory that guides visitors to your website’s location. The following covers the four most common record types and when you’d use each one.

 

 

A Records

An A record (Address record) points a domain or subdomain directly to an IPv4 address. It is the most basic record type and is used when you want a domain name to resolve straight to a server’s numeric address.

When to use it:

  1. 1. Pointing your root domain (e.g. example.com) to your web hosting server.
  2. 2. Pointing a subdomain (e.g. shop.example.com) to a specific server IP.
  3. 3. Connecting a domain or subdomain directly to a server with a fixed IP address.

Note:
• If your server’s IP address changes, any A records pointing to that IP address must be updated.
• For IPv6 addresses, the equivalent record type is an AAAA record.

 

CNAME Records

A CNAME record (Canonical Name record) points a domain or subdomain to another domain name instead of an IP address. It creates an alias, so the target domain’s own DNS records are used to resolve the final destination.

When to use it:

  1. 1. Pointing a subdomain (e.g. www.example.com) to your root domain or a third-party service.
  2. 2. Connecting a subdomain to a hosted platform (e.g. a website builder or CDN) that provides a hostname instead of an IP.
  3. 3. Keeping DNS management simple when the target server’s IP may change, since the CNAME automatically follows updates to the target domain.

Note:
• A CNAME record is normally used for subdomains rather than the root domain.
• A hostname with a CNAME record cannot have other DNS record types, such as A, MX, or TXT, at the same hostname.

 

MX Records

An MX record (Mail Exchange record) specifies which mail server is responsible for receiving email on behalf of your domain, along with a priority value.

When to use it:

  1. 1. Directing incoming email to your email hosting provider’s mail servers.
  2. 2. Setting up multiple mail servers with different priority values for failover (lower values are tried first).
  3. 3. Migrating email providers, where MX records are updated to point to the new provider’s mail servers

Warning: MX records must point to a hostname, never directly to an IP address. Using an IP address instead of a hostname will result in an invalid MX configuration and may prevent email delivery.

 

TXT Records

A TXT record (Text record) stores text-based information in DNS. It doesn’t route traffic directly, but is widely used for verification and email authentication.

When to use it:

  1. 1. Publishing an SPF record to specify which servers are authorized to send email for your domain.
  2. 2. Publishing a DKIM record to allow recipient servers to verify that email was signed by your domain.
  3. 3. Publishing a DMARC record to define how receiving servers should handle unauthenticated email.
  4. 4. Verifying domain ownership for third-party services (e.g. Google Workspace, SSL certificate issuance).

Note:
• Each individual string within a TXT record is limited to 255 characters. Longer values can be split into multiple strings.
• A domain can have multiple TXT records but, only one SPF record should be published for a domain. Multiple SPF TXT records can cause SPF validation error.

 

DNS Record Types at a Glance

Record Type Points To Typical Use Case
A IPv4 address Root domain or subdomain pointing directly to a server
CNAME Another domain name Subdomain aliasing to a hosted platform or another hostname
MX Mail server hostname + priority Routing incoming email to a mail server
TXT Text string Email authentication (SPF, DKIM, DMARC) or domain verification

 

Common Mistakes to Avoid

  1. 1. Using an IP address in an MX record instead of a hostname, MX records must point to a hostname, not an IP address.
  2. 2. Using a CNAME record at the root domain. A conventional CNAME is normally used for subdomains and cannot coexist with other DNS records at the same name.
  3. 3. Publishing more than one SPF TXT record. A domain should have only one SPF record. Publishing multiple SPF records can cause SPF validation errors.
  4. 4. Combining a CNAME with other record types at the same host name, a subdomain with a CNAME cannot also have an MX, TXT, or A record at that same name.
  5. 5. Leaving a trailing dot on hostnames, this can break the record depending on the DNS panel.

 

FAQ

Can I use an A record and a CNAME record on the same subdomain?
No. A host name can have a CNAME or other record types (A, MX, TXT), but not both at once.

Why can’t I put a CNAME on my root domain?
The root domain typically needs to carry other records (such as MX for mail), and a CNAME cannot coexist with any other record type at the same name, so most registrars block CNAMEs at the root entirely.

What does the priority number in an MX record mean?
It tells receiving mail systems which server to try first. Lower numbers are attempted first, while higher numbers act as backups if the primary server is unavailable.

Can a domain have multiple TXT records?
Yes, A domain can have multiple TXT records for different purposes. However, only one SPF record should be published for a domain.

 

Need reliable email hosting to go with your DNS setup?

Z.com’s Unlimited Email Hosting gives you the mailboxes and storage to match — no limits, no surprises.

Order Unlimited Email Hosting