DNS record types are the instructions that tell the Domain Name System how to route traffic for your domain, from pointing a website to an IP address to directing email to a mail server. This article explains the most common record types, what each one does, and how to choose the right ones for your needs.
Formula
The TTL (Time to Live) value in DNS is a number of seconds that tells recursive resolvers how long to cache a record before asking the authoritative server again. The formula to convert TTL to hours is:
hours = TTL / 3600
Where TTL is in seconds and 3600 is the number of seconds in one hour. For example, a TTL of 3600 seconds equals 1 hour.
Worked Example
Using the default value from the calculator:
- TTL = 3600 seconds
- Divide by 3600: 3600 / 3600 = 1
- Result: 1 hour
So a TTL of 3600 seconds means resolvers will cache the record for exactly one hour before checking again.
What Are DNS Records?
DNS (Domain Name System) records are entries stored on authoritative nameservers that map a domain name to a specific resource—an IP address, a mail server, a text string, or another domain. When you type a URL into a browser, the DNS resolver looks up the relevant record to find where to send your request. Each record has a type, a name (the domain or subdomain it applies to), a TTL (how long it can be cached), and type-specific data.
There are dozens of record types defined by the IETF, but most domain owners only use a handful. Understanding the difference between them helps you configure your domain correctly and troubleshoot issues like email bouncing or a website not loading.
Common Record Types
Here are the record types you are most likely to encounter:
- A (Address) Record – Maps a hostname to a 32-bit IPv4 address. Example:
example.com A 93.184.216.34. Used for almost all websites. - AAAA (Quad-A) Record – Maps a hostname to a 128-bit IPv6 address. Example:
example.com AAAA 2606:2800:220:1:248:1893:25c8:1946. Needed if your server supports IPv6. - CNAME (Canonical Name) Record – Aliases one hostname to another. Example:
www.example.com CNAME example.com. The target must be a hostname, not an IP address. - MX (Mail Exchange) Record – Specifies the mail server(s) responsible for receiving email for the domain. Includes a priority number; lower numbers are tried first. Example:
example.com MX 10 mail.example.com. - TXT (Text) Record – Stores arbitrary text, often used for verification (e.g., SPF, DKIM, DMARC). Example:
example.com TXT "v=spf1 include:_spf.example.com ~all". - NS (Name Server) Record – Delegates a domain or subdomain to a set of authoritative nameservers. Example:
example.com NS ns1.example.com. - SOA (Start of Authority) Record – Holds administrative information about the zone, including the primary nameserver, the admin email, and the serial number for zone transfers.
- PTR (Pointer) Record – Used for reverse DNS lookups, mapping an IP address back to a hostname. Often required for email servers to pass spam filters.
Less Common But Useful Record Types
Beyond the basics, several other record types serve specific purposes:
- SRV (Service) Record – Defines a host and port for specific services like SIP (VoIP) or Active Directory. Example:
_sip._tcp.example.com SRV 10 60 5060 sipserver.example.com. - CAA (Certification Authority Authorization) Record – Restricts which certificate authorities can issue SSL/TLS certificates for your domain. Example:
example.com CAA 0 issue "letsencrypt.org". - NAPTR (Naming Authority Pointer) Record – Used for complex routing rules, often in telecom (ENUM) or SIP.
- DS (Delegation Signer) Record – Used with DNSSEC to authenticate a child zone’s DNSKEY records.
- DNSKEY Record – Stores the public key used to verify DNSSEC signatures.
How to Choose the Right Record Type
Choosing the correct record type depends entirely on what you are trying to accomplish:
- For a website – Use an A record for IPv4 and an AAAA record for IPv6. If you use a CDN or a service like GitHub Pages, use a CNAME to point to the provider’s hostname.
- For email – Set up MX records pointing to your mail provider, plus TXT records for SPF, DKIM, and DMARC to improve deliverability.
- For subdomains – Use CNAME records for subdomains like
blog.example.comif you want them to point to another hostname. - For service discovery – Use SRV records to specify port and host for protocols like XMPP or Minecraft.
- For security – Add CAA records to control who can issue certificates for your domain.
Common DNS Problems and Misconceptions
One frequent misconception is that a CNAME record can point to an IP address—it cannot, it must point to a hostname. Another is that changing a DNS record takes effect immediately; in reality, the TTL determines how long old values remain cached. If you set a TTL of 86400 seconds (24 hours), users may see the old IP for a full day after you update it.
Another common issue is mixing up A and AAAA records. If your server only has an IPv4 address, adding an AAAA record with a bogus IPv6 address will cause some users to experience timeouts. Similarly, forgetting to add an MX record means email to your domain will fail, even if your website works fine.
Reverse DNS (PTR records) is often overlooked. Many email servers reject messages from IPs without a matching PTR record, so if you run your own mail server, ensure your ISP or hosting provider sets up the PTR record correctly.
DNS Record Costs and Management
DNS records themselves are free—you pay for the domain registration and possibly for a DNS hosting service if you use a third-party provider. Most domain registrars include DNS management at no extra cost. However, premium DNS services (with higher query capacity, DDoS protection, or global anycast) may charge a monthly fee. The cost is generally low, often under $10 per month for small sites, but it varies widely by provider.
You can manage your DNS records through your registrar’s control panel or a separate DNS provider. When you change nameservers, you are telling the world to use a different set of authoritative servers for your domain—this change can take up to 48 hours to propagate due to TTL caching.
Frequently Asked Questions
What is the difference between an A record and a CNAME record?
An A record points directly to an IPv4 address, while a CNAME points to another hostname. Use A for the root domain and CNAME for subdomains that should follow another hostname’s IP.
Can I use a CNAME for my root domain (example.com)?
Technically, the DNS specification discourages it, and many providers do not allow it because the root domain already has SOA and NS records. Some providers support “CNAME flattening” which resolves the CNAME to an IP at the edge, but it is not standard.
How long does a DNS change take to propagate?
It depends on the TTL you set. Lower TTLs (e.g., 300 seconds) mean changes spread quickly, but increase query load. Higher TTLs (86400 seconds) reduce load but delay updates. Most changes propagate within 24-48 hours.
What is SPF, and why is it a TXT record?
SPF (Sender Policy Framework) is an email authentication method that lists which servers are allowed to send email for your domain. It is published as a TXT record because the original SPF record type (type 99) is obsolete.
Do I need DNSSEC?
DNSSEC adds cryptographic signatures to your DNS records to prevent spoofing. It is recommended for any domain, but it adds complexity—you must manage keys and ensure your provider supports it. Many registrars offer it as a one-click feature.
What happens if I delete an MX record?
Email to your domain will stop working—messages will be bounced or delayed. Make sure you have a backup MX record or a mail forwarding service before deleting the primary one.
Related
Formula used
in t | TTL (seconds) | seconds | 3600 | 1 | 86400 out exp | Cache duration | hours | t / 3600 | 2
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- Valheim Server Not Showing in Community List Fixes
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Surface Won’t Turn On: Quick Fixes1.8 h
- Survive Lava for Brainrot Tier List170 points
- MySQL Dump Import: Fix Common Errors