DNS Records Explained: A, CNAME, MX, TXT, and More
DNSdomain managementemail DNSsubdomainswebsite setup

DNS Records Explained: A, CNAME, MX, TXT, and More

tthehost.cloud Editorial Team
2026-11-30
6 min read

Understand A, CNAME, MX, TXT, NS, and CAA records, then use practical DNS checklists to connect websites, email, and services safely.

DNS records are the instructions that connect a domain to a website, email provider, verification service, or other destination. This guide explains the most common record types, shows when to use each one, and provides a practical checklist for making DNS changes without creating conflicts.

Overview

When you register a domain, the domain name itself does not automatically tell browsers or mail servers where to go. The Domain Name System (DNS) supplies that information through records stored with your DNS provider. Your registrar, web host, CDN, or another specialist service may provide the DNS management interface, depending on where the domain’s authoritative name servers point.

Each record has a purpose, a name, a value, and often a time-to-live (TTL). The name identifies the domain or subdomain, while the value tells DNS clients what destination or instruction to use. Field labels vary between providers, so confirm whether an interface expects a full domain name, a host label such as www, or an automatically appended domain.

RecordWhat it doesTypical use
APoints a name to an IPv4 addressConnecting a domain or subdomain to a server
AAAAPoints a name to an IPv6 addressConnecting a service that uses IPv6
CNAMEAliases one hostname to another hostnameConnecting www or a hosted SaaS service
MXSpecifies mail servers and their priorityRouting email for a domain
TXTStores text-based instructions or verification dataSPF, DKIM, DMARC, and service verification
NSIdentifies authoritative name serversDelegating DNS management to a provider
CAADefines which certificate authorities may issue certificatesControlling certificate issuance for a domain

An A record versus a CNAME is a common point of confusion. Use an A record when you have an IP address. Use a CNAME when the destination is another hostname that the destination provider may change. A CNAME cannot generally coexist with other records at the same hostname, so check for existing records before adding one.

Checklist by scenario

Connecting a website

  1. Confirm whether the hosting provider gave you an IPv4 address, an IPv6 address, a hostname, or a name-server pair.
  2. Use an A record for the root domain when the provider gives you an IPv4 address. Add an AAAA record only when the provider supplies an IPv6 address and your service is configured to use it.
  3. Use a CNAME for a subdomain such as www when the provider gives you a hostname rather than an IP address.
  4. Check whether an existing A, AAAA, or CNAME record conflicts with the new configuration.
  5. Verify both the root domain and the preferred www or non-www version, then configure the other version to redirect if required by your hosting setup.

If your website runs on a VPS or developer hosting environment, record the intended server address in your deployment notes. A DNS change should be coordinated with the web server, firewall, and SSL configuration. The VPS Hosting for Developers setup checklist can help organize those related tasks.

Connecting email

  1. Obtain the exact MX hostnames and priority values from your email provider.
  2. Remove obsolete MX records only after confirming that the new provider is ready to receive mail.
  3. Add the provider’s TXT records for SPF or other domain verification requirements.
  4. Publish DKIM records exactly as supplied. These may use TXT records or provider-specific CNAME records.
  5. Add or review the DMARC TXT record and understand its reporting or enforcement setting before changing it.
  6. Send test messages to and from more than one mailbox, and check whether replies are delivered.

Do not guess email authentication values. SPF, DKIM, and DMARC depend on the services that send mail for your domain. Use the email authentication DNS checklist when adding or auditing these records.

Adding a subdomain or SaaS service

  1. Decide on the exact hostname, such as app.example.com, status.example.com, or verify.example.com.
  2. Use the record type specified by the service. A verification task may require a TXT record, while an application may require an A or CNAME record.
  3. Keep the host label consistent with the service’s instructions. A value intended for app may be entered incorrectly if the interface expects the complete hostname.
  4. Record the purpose, value, provider, and date in a DNS change log.
  5. After propagation, complete verification in the service dashboard and test the subdomain.

Delegating DNS to another provider

Changing NS records or the domain’s name-server settings moves authoritative DNS management. Before doing so, copy every active record, including website, email, verification, security, and subdomain records. Recreate the records at the new provider before changing delegation where possible. For a broader domain move, review how to transfer a domain without losing email or website access.

What to double-check

  • Record name: Confirm whether the control panel wants @, a blank host, a short label, or a full domain name for the root domain.
  • Destination format: A and AAAA records require IP addresses. CNAME, MX, and NS records normally require hostnames, not IP addresses.
  • Trailing dots: Some interfaces accept a fully qualified hostname with a trailing dot and some add it automatically. Follow the provider’s format.
  • MX priority: Lower numerical values commonly indicate higher delivery priority, but use the values supplied by your email provider rather than inventing an order.
  • Duplicate records: Multiple A records can distribute requests between addresses, but adding one accidentally can send traffic to the wrong server. Duplicate MX records can also affect mail routing.
  • TTL: A lower TTL can make planned changes easier to adjust, while a longer TTL can reduce how frequently resolvers ask for updates. Treat TTL as a planning setting, not a guarantee of immediate propagation.
  • HTTPS readiness: Pointing DNS at a new host does not by itself install or validate an SSL certificate. Check the certificate configuration separately; see common SSL certificate errors if the site reports a certificate mismatch.

DNS updates are cached by recursive resolvers. Some users may see the old answer while others see the new one. The timing depends on prior TTL values, resolver behavior, and the provider’s systems. Test from more than one network, but do not repeatedly change records simply because one resolver has not updated yet.

Common mistakes

  • Replacing all records with website records: A website connection does not replace email, verification, DKIM, or other operational records.
  • Creating a CNAME at the root: Root-domain CNAME support varies by DNS provider. Follow the provider’s documented method instead of assuming a standard CNAME field will work.
  • Leaving old mail records active: Keeping old and new MX records together can route messages to an unintended provider.
  • Publishing several SPF records: SPF is designed to be represented by one policy for a domain. Combine authorized sending services according to the email provider’s instructions rather than adding separate policies.
  • Editing NS records without copying the zone: This can make the website, email, and verification services appear to fail at the same time.
  • Testing only one hostname: The root domain, www, mail hostnames, and subdomains can use different records and should be checked separately.
  • Changing DNS without a rollback note: Save the previous value before editing a production record so you can restore it if the change has an unexpected effect.

When to revisit

Use this checklist before launching a website, moving web hosting, changing email providers, adding a SaaS tool, creating a subdomain, renewing a security setup, or transferring a domain. Revisit the zone after organizational changes as well: an old verification record or mail authorization may remain long after a service has been retired.

Schedule a DNS review before seasonal planning cycles or major campaigns, when workflows or tools change, and whenever a provider changes its required record format. During the review, export or document the current zone, identify records without a clear owner, confirm that email authentication still reflects real sending services, and remove only records that have been verified as obsolete.

Finally, keep a simple change log with the date, reason, person responsible, old value, new value, and rollback plan. That small habit makes DNS management safer and gives the next administrator enough context to troubleshoot without guessing.

Related Topics

#DNS#domain management#email DNS#subdomains#website setup
t

thehost.cloud Editorial Team

Technical Editorial Team

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.