DNS Record Types Explained (A, CNAME, MX, TXT)

What a DNS Record Actually Is

A domain's DNS configuration isn't just one single piece of information - it's a set of different record types, each serving a distinct purpose, from pointing to a website's server to configuring where its email should be delivered.

A Record: The Basic Address Mapping

example.com.   A   93.184.216.34

An A record maps a domain name directly to an IPv4 address - the most fundamental and common DNS record type.

CNAME Record: An Alias for Another Name

www.example.com.   CNAME   example.com.

A CNAME record points one domain name to another domain name, rather than directly to an IP address. If example.com's IP address ever changes, every CNAME pointing to it automatically stays correct, since it wasn't the CNAME that needed updating.

MX Record: Where Email Should Go

example.com.   MX   10   mail.example.com.

MX (Mail Exchange) records tell other mail servers which server is responsible for accepting email for a domain - and the priority number lets multiple mail servers be configured with a preferred order.

TXT Record: Arbitrary Text Data

TXT records store free-form text, commonly used to verify domain ownership (for services like Google Workspace) or to configure email authentication policies like SPF and DKIM, which help prevent email spoofing.

Quick Reference

RecordPoints toCommon use
AAn IPv4 addressBasic website hosting
CNAMEAnother domain nameAliases, subdomains
MXA mail serverEmail delivery
TXTArbitrary textDomain verification, email security
Written by Lorens Mishra

Software Engineer Notes Management System Administrator

Discussion

0 comments
Sign in to join the discussion.

No comments yet. Be the first to say something.