A and AAAA records are the DNS records that point a domain name to a server's IP address. An A record holds an IPv4 address; an AAAA record holds an IPv6 address. Every website needs at least one of them. This guide explains how they work and how to manage them.
Before you start
Know where your domain's DNS is hosted – at MdmHost (cPanel's Zone Editor), at your registrar, or at a service like Cloudflare. Changes must be made where the domain's nameservers point.
A record (IPv4)
example.com. 3600 IN A 203.0.113.50This says: example.com lives at the IPv4 address 203.0.113.50, and resolvers may cache the answer for 3,600 seconds.
AAAA record (IPv6)
example.com. 3600 IN AAAA 2001:db8::50The name comes from IPv6 addresses being four times as long as IPv4 (128 bits vs 32). Browsers on IPv6 networks prefer AAAA when it exists.
Warning: Only add an AAAA record if your server really serves the site over IPv6. A wrong AAAA record breaks the site for IPv6 visitors while it looks fine to you on IPv4.
Common A record setups
| Name | Type | Value | Purpose |
|---|---|---|---|
@ (root) | A | 203.0.113.50 | example.com |
www | A or CNAME | 203.0.113.50 / example.com | www.example.com |
mail | A | 203.0.113.60 | Mail server hostname |
* | A | 203.0.113.50 | Wildcard – any undefined subdomain |
The root of a domain cannot be a CNAME, so it always uses A/AAAA (or a provider's ALIAS/flattening feature).
Multiple A records
You can publish several A records for one name. Resolvers return all of them and clients pick one, giving simple round-robin distribution. There is no health checking, so a dead server keeps receiving traffic – use a load balancer for real failover.
Add or change an A record in cPanel
- Open cPanel → Domains → Zone Editor.
- Click Manage next to the domain.
- Edit the existing A record or click Add Record, choose type A, enter the name and IPv4 address, and save.
Choosing a TTL
- 3600–14400 s for stable records.
- 300 s a day before a planned server move, so the change spreads quickly; raise it again afterwards.
Check A and AAAA records
dig example.com A +short
dig example.com AAAA +short
nslookup example.comTo bypass caches, ask the authoritative nameserver directly: dig @ns1.yourdns.com example.com A.
Troubleshooting
- Site still shows the old server: resolvers or your computer cache the old record until the TTL expires; flush local DNS cache.
- Works on Wi-Fi, fails on mobile: mobile networks often use IPv6 – check the AAAA record.
- Changes have no effect: you edited DNS at a provider the domain does not use – check its NS records.
FAQ: A and AAAA records
Do I need both A and AAAA records?
An A record is required for IPv4 visitors. Add AAAA only if your server supports IPv6.
Can an A record point to another domain?
No, an A record must contain an IP address. Use a CNAME to point one name at another.
How long does an A record change take?
Usually minutes to a few hours, depending on the previous TTL.
