DNS records are entries in a DNS zone file that tell the internet how to route domain traffic. They map domain names to IP addresses, services, or other domains.
š Common DNS Record Types
Record Type |
Purpose |
Example |
A |
Maps domain to an IPv4 address |
example.com ā 192.0.2.1 |
AAAA |
Maps domain to an IPv6 address |
example.com ā 2001:db8::1 |
CNAME |
Alias to another domain name |
www.example.com ā example.com |
MX |
Specifies mail servers for email delivery |
mail.example.com priority 10 |
TXT |
Holds text data, often for SPF, DKIM, validation |
v=spf1 include:amazonses.com |
NS |
Lists name servers responsible for the domain |
ns-1234.awsdns-56.org |
SOA |
Stores zone metadata like serial number, TTL |
Start of Authority record |
PTR |
Reverse DNS ā IP ā domain (used in lookups) |
192.0.2.1 ā example.com |
SRV |
Specifies service-specific info (e.g., VoIP, LDAP) |
_sip._tcp.example.com |
CAA |
Specifies which CAs can issue SSL certs for domain |
0 issue "letsencrypt.org" |
Alias |
AWS-specific alternative to CNAME (ELB, S3, etc.) |
example.com ā my-load-balancer |
š§ Example: A Typical Website
For www.certifikation.com
, DNS might look like this:
Record Type |
Name |
Value |
A |
certifikation.com |
3.6.142.77 (EC2 IP) |
CNAME |
www.certifikation.com |
certifikation.com |
MX |
@ |
10 mail.certifikation.com |
TXT |
@ |
v=spf1 include:amazonses.com |
Alias |
www |
ELB DNS name (AWS Route 53) |
š Tips
-
A vs CNAME: A points to IP; CNAME points to another domain
-
MX: Needed for email services
-
TXT: Used for email security (SPF, DKIM, DMARC) and domain verification
-
Alias: Preferred over CNAME for root domains in AWS Route 53
ā
Summary
Record |
Used For |
A / AAAA
|
Pointing to IP addresses |
CNAME |
Aliasing to another domain |
MX |
Routing emails |
TXT |
Domain verification & email security |
NS |
Delegating DNS authority |
Alias |
AWS services mapping (ELB, S3, etc.) |