← cPanel Hosting

Understanding DNS records

A plain-English guide to A, AAAA, CNAME, MX and TXT records and when each is used.

DNS translates names such as www.example.com into the services that handle the website, email and verification records. The most common records are A, AAAA, CNAME, MX and TXT.

Step by step

  1. Use an A record to point a hostname to an IPv4 address; AAAA performs the equivalent job for IPv6.
  2. Use CNAME when one hostname should alias another hostname.
  3. Use MX records to identify the mail servers responsible for receiving email for the domain.
  4. Use TXT records for verification and email policies such as SPF, DKIM and DMARC.
  5. Lower TTL before a planned migration when appropriate, make the change, then allow caches time to expire.
Important

DNS changes are not always immediate because resolvers cache previous answers. Do not repeatedly change records while waiting for propagation unless you know the first change is wrong.

Checks and troubleshooting

If web works but email fails, inspect MX/TXT records separately from the website A record. Keep a copy of the old zone values before a migration.