DNS Records: A beginner friendly guide
A DNS record is an entry in your domain's DNS zone file that provides instructions on how to handle requests related to your domain. These records are managed through your domain registrar or hosting provider's DNS settings.
Each type of DNS record serves a different purpose. Here’s a breakdown of the most common records you’ll encounter:
1. A Record (Address Record)
An A Record, short for Address Record, is one of the most fundamental DNS entries. It maps your domain name or subdomain directly to an IPv4 address—a 32-bit numerical label like 192.0.2.1 that identifies a server on the internet. When someone types your domain into a browser, the A Record tells the DNS resolver where to find the hosting server.
Unlike other records that might point to names or services, the A Record deals strictly with IPv4 addresses.
Example
- Domain: example.com
- A Record: Points to 192.0.2.1
- Result: Visiting example.com loads the website hosted at that IP.
Use Case: Connects your domain to a website hosted on a server with an IPv4 address.
2. AAAA Record (IPv6 Address Record)
The AAAA Record (pronounced "quad-A") is the IPv6 counterpart to the A Record. IPv6 addresses are longer (128 bits) and designed to replace IPv4 due to the exhaustion of available IPv4 addresses. It points your domain or subdomain to an IPv6 address, enabling compatibility with modern networks that support this protocol.
As internet adoption of IPv6 grows (over 40% globally as of 2023), AAAA Records are becoming essential for future-proofing your online presence.
Example
- Domain: example.com
- AAAA Record: Points to 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- Result: Devices on IPv6 networks connect directly to this address for faster, more efficient routing.
Use Case: Used when your server supports IPv6.
3. CNAME Record (Canonical Name Record)
A CNAME Record, or Canonical Name Record, acts as an alias. Instead of pointing to an IP address, it redirects one domain or subdomain to another domain name. This creates a reference rather than a direct mapping, making it flexible for managing multiple names without repeating IP details.
Important note: CNAMEs can't be used for the root domain (example.com) in most setups; they're ideal for subdomains.
Example
- Subdomain: www.example.com
- CNAME Record: Points to example.com
- Result: Traffic to www.example.com is forwarded to example.com's IP (resolved via its A/AAAA Record).
Use Case: Useful for making multiple subdomains point to the same website without duplicating IP addresses.
4. MX Record (Mail Exchange Record)
MX Records, or Mail Exchange Records, specify the mail servers responsible for receiving emails sent to your domain. They include a priority value (lower numbers mean higher priority) to allow backups if the primary server fails.
This record doesn't handle outgoing mail; it's purely for incoming email routing.
Example
- Domain: example.com
- MX Record: Points to mail.example.com with priority 10
- Result: Emails to user@example.com are delivered to mail.example.com.
Use Case: Ensures emails to user@example.com go to the right server. You can have multiple MX records with different priorities.
5. TXT Record (Text Record)
TXT Records store arbitrary text data associated with your domain. They're versatile and often used for verification or configuration rather than direct routing.
No length limit in theory, but practical caps apply (e.g., 255 characters per string).
Example
- TXT Record: "v=spf1 include:spf.protection.example.com ~all"
- Result: This SPF entry tells email receivers which servers are authorized to send mail from your domain.
Use Case:
Domain Verification: Services like Google Search Console or Facebook require TXT Records to prove ownership before granting access.
Email Security (SPF, DKIM, DMARC): Prevent spoofing; e.g., SPF lists allowed IP ranges, reducing spam flags.
6. SRV Record (Service Record)
An SRV Record, or Service Record (type 33), is a specialized DNS entry that pinpoints the location of specific services associated with your domain. Unlike A or AAAA Records, which link a domain directly to an IP address, SRV Records map a service (like VoIP or email) and its protocol (e.g., TCP or UDP) to a specific hostname and port number. They also include priority and weight values to guide how clients should prioritize or balance connections across multiple servers.
This structured approach makes SRV Records ideal for dynamic, service-specific configurations, ensuring clients connect to the right server and port efficiently.
Example
- SRV Record: _sip._tcp.example.com points to sipserver.example.com on port 5060, with priority 10 and weight 5.
- Result: VoIP clients connect to sipserver.example.com:5060 for SIP-based calls, following the specified priority and load balancing.
Use Case: Commonly used for services like VoIP, chat servers, and Microsoft Exchange.
Updated on: 12/11/2025
Thank you!
