Our new customer portal is now live!
Guides

The difference between A, AAAA, CNAME, MX and TXT records

Choose the right DNS record for websites, email and service verification.

5 min · Beginner

Updated

In this guide

Common record types

  • A maps a name to an IPv4 address.
  • AAAA maps a name to an IPv6 address.
  • CNAME points a name to another DNS name. It is not a browser HTTP redirect.
  • MX identifies a domain's receiving email services. A lower priority number is preferred.
  • TXT stores text, such as a service verification value or email authentication setting.
  • NS identifies nameservers. Changing a domain's main nameservers is normally done through its registrar.

Add the correct record in the correct place

  1. Obtain the type, name and value from the connected service's own instructions or dashboard.
  2. Open the active DNS provider and check for existing records with the same name.
  3. Add or edit the appropriate record. A and AAAA values contain IP addresses; a CNAME value contains a hostname without https:// or a page path.
  4. Check whether the DNS interface appends the domain automatically. If it does, a short name such as www is sufficient in the Name field.
  5. Save and verify through a DNS lookup and the connected service.

Avoid conflicting records

A conventional CNAME cannot coexist with A, AAAA, MX or TXT records at the same name. Follow your provider's specific solution for the root domain; do not assume a conventional CNAME is appropriate there.

If the website works for only some visitors

Check both A and AAAA. An old IPv6 address can send some connections to a different service. Keep working email and verification records even if they do not relate to the new website destination.

Sources and further reading