DNS (Domain Name System) records are essential for directing traffic on the internet. They map domain names to IP addresses, specify mail servers, and provide other information about a domain. This article explains common DNS record types including A, AAAA, CNAME, MX, TXT, SRV, and NS, detailing their purposes, formats, and real-world examples.
A Record (IPv4 Address)
The A record maps a domain name to an IPv4 address. This is the most basic DNS record type used for directing traffic to web servers.
- Purpose: To associate a hostname with an IPv4 address.
- Format: Domain Name, TTL (Time to Live), Record Type (A), IPv4 Address
- Example:
www.internetport.se. 3600 IN A 192.168.1.1
AAAA Record (IPv6 Address)
The AAAA record is similar to the A record but maps a domain name to an IPv6 address.
- Purpose: To associate a hostname with an IPv6 address.
- Format: Domain Name, TTL, Record Type (AAAA), IPv6 Address
- Example:
www.internetport.se. 3600 IN AAAA 2001:db8::1
CNAME Record (Alias)
The CNAME record creates an alias for a domain name, pointing it to another domain.
- Purpose: To create an alias for a domain name.
- Format: Alias Domain Name, TTL, Record Type (CNAME), Canonical Name
- Example:
mail.internetport.se. 3600 IN CNAME mailserver.internetport.se.
MX Record (Mail Exchange)
The MX record specifies the mail server responsible for receiving emails sent to a domain.
- Purpose: To specify the mail server for a domain.
- Format: Domain Name, TTL, Record Type (MX), Preference Value, Mail Server
- Example:
internetport.se. 3600 IN MX 10 mail.internetport.se.
TXT Record (Text)
The TXT record is used for storing text data associated with a domain, often for SPF, DKIM, or verification purposes.
- Purpose: To store text information about the domain.
- Format: Domain Name, TTL, Record Type (TXT), Text Data
- Example:
internetport.se. 3600 IN TXT "v=spf1 include:_spf.google.com ~all"
SRV Record (Service)
The SRV record is used to locate services on a domain, commonly for VoIP and Microsoft Teams.
- Purpose: To specify the location of services such as VoIP or Teams.
- Format: Service Name, Protocol, Domain Name, TTL, Record Type (SRV), Priority, Weight, Port, Target
- Example:
_sip._tcp.internetport.se. 3600 IN SRV 10 50 5060 sipserver.internetport.se.
NS Record (Name Server)
The NS record specifies the authoritative DNS servers for a domain, delegating control over DNS records.
- Purpose: To specify the authoritative DNS servers for a domain.
- Format: Domain Name, TTL, Record Type (NS), Authoritative DNS Server
- Example:
internetport.se. 3600 IN NS ns1.internetport.se.
Troubleshooting Tips
If you encounter issues with DNS records, consider the following troubleshooting steps:
- Verify that all DNS records are correctly formatted and entered into your DNS management console.
- Ensure that TTL (Time to Live) values are appropriate for your needs; lower TTLs allow changes to propagate faster but can increase server load.
- Use online tools like
dig,nslookup, or What's My DNS to check the status of your DNS records across different DNS servers. - If you recently made changes, allow time for them to propagate; this can take up to 48 hours depending on TTL settings.
- Contact Internetport support if you continue to experience issues after verifying and troubleshooting your DNS records.