DNS Records Explained: A, CNAME, MX, TXT (With Examples)

DNS is the phone book of the internet. These are the records you will actually use.
A and AAAA records
Point your domain to a server's IP address. A = IPv4 (e.g. 13.235.152.20), AAAA = IPv6. This is the most common record — your website lives here.
CNAME records
Point one name to another name. Use for subdomains: www → yourdomain.com. Never use CNAME on the root domain itself.
MX records
Direct email to your mail server. Includes a priority number — lower numbers are tried first. Get these wrong and email silently breaks.
TXT records
Free-form text used for verification and email security (SPF, DKIM, DMARC). Also used by Google and others to verify domain ownership.
Common mistakes
- Forgetting the trailing dot in some DNS editors.
- Setting TTL too high before a migration (use 300 seconds).
- Creating duplicate A records and wondering why traffic splits.

