A, AAAA, and CNAME records
These are DNS (Domain Name System) record types that help route internet traffic to the right places. Each one serves a different purpose in how domains and subdomains are resolved to IP addresses or other domain names.
Here’s a quick breakdown of what A, AAAA, and CNAME records are:
📌 1. A Record (Address Record)
What it does: Maps a domain name to an IPv4 address (e.g.,
192.168.1.1
).Use case: It tells DNS that "when someone goes to
example.com
, send them to the server at IP address192.168.1.1
".
Example:
So if a user types
example.com
, the browser knows to connect to93.184.216.34
.
📌 2. AAAA Record (IPv6 Address Record)
What it does: Maps a domain name to an IPv6 address (e.g.,
2606:2800:220:1:248:1893:25c8:1946
).Use case: Similar to an A record, but for modern IPv6 addresses.
Example:
This allows devices using IPv6 to connect directly to the server.
📌 3. CNAME Record (Canonical Name Record)
What it does: Creates an alias from one domain to another domain (not to an IP).
Use case: Useful when you want multiple domain names to point to the same server or resource.
Example:
This means
www.example.com
is just an alias for example.com and will use the same A or AAAA record ofexample.com
.
🔄 Summary Table
Record Type | Maps To | IP Version | Common Use Case |
---|---|---|---|
A | IPv4 address | IPv4 | example.com → 93.184.216.34 |
AAAA | IPv6 address | IPv6 | example.com → 2606:... |
CNAME | Another domain | N/A | blog.example.com → example.com |
❗ Notes:
A domain with a CNAME record cannot have any other records (like A or MX) at the same level.
Use A or AAAA for pointing to IP addresses, and CNAME when you want to redirect to another domain.