DNS Records Explained: A Reference Guide to A, CNAME, MX, TXT, and More
DNSdomain securityemail setupdomain verificationDNS records

DNS Records Explained: A Reference Guide to A, CNAME, MX, TXT, and More

NName Host Studio
2026-11-27
8 min read

A practical DNS reference covering A, AAAA, CNAME, MX, TXT, NS, SRV, and CAA records, with safe editing workflows.

DNS records connect a domain name to websites, email systems, verification services, and security controls. This reference guide explains what the common record types do, which one to use for each task, and how to edit DNS safely without interrupting a working site or mailbox.

Overview

The Domain Name System (DNS) translates human-readable names such as example.com into information that browsers, mail servers, and other services can use. A DNS record is one instruction inside that system. For example, an A record can point a hostname to an IPv4 address, while an MX record tells other mail servers where to deliver email.

DNS is usually managed at the provider whose nameservers are authoritative for your domain. That may be your domain registrar, web host, DNS provider, or a separate security and performance service. Before editing anything, identify the authoritative nameservers. Changing records in an account that is not authoritative will not change the public DNS configuration.

DNS record reference

RecordPurposeTypical valueImportant detail
APoints a hostname to an IPv4 address192.0.2.10Use an address supplied by your hosting or server provider.
AAAAPoints a hostname to an IPv6 address2001:db8::10Only add it when the destination is correctly configured for IPv6.
CNAMEAliases one hostname to another hostnameapp.host.exampleIt points to a name, not an IP address, and normally cannot share a name with other data records.
MXDefines mail delivery servers10 mail.example.netThe preference number determines priority; lower values are preferred.
TXTStores text used for verification and email policyv=spf1 include:...Exact syntax matters, and some values must be split into quoted strings in a control panel.
NSIdentifies authoritative nameserversns1.dns-provider.exampleNameserver changes affect the entire DNS zone, not just one hostname.
SRVPublishes a service location and port10 5 443 service.exampleCommon in collaboration, voice, and other application-specific setups.
CAAStates which certificate authorities may issue certificates0 issue "ca.example"Configure it only when you understand the certificate issuers your services use.

DNS record names are often entered relative to the zone. A control panel may expect www rather than www.example.com, and may represent the root domain as @ or leave the name blank. Follow the provider's field instructions and check the resulting fully qualified name after saving.

The A record versus CNAME choice is straightforward: use A or AAAA when you have an IP address, and CNAME when a service gives you another hostname. The root or apex domain has special handling. Traditional DNS does not allow a normal CNAME at the same name as other records, so some providers offer an implementation called ALIAS, ANAME, or CNAME flattening. Use the option supported by your DNS provider rather than copying a generic CNAME instruction to the root.

Checklist by scenario

To connect a domain to web hosting

  1. Confirm whether the host expects an A record, AAAA record, CNAME, or a nameserver change.
  2. Record the current DNS values before changing anything. Include website, email, verification, and security records.
  3. For an IP-based setup, update the relevant hostname's A record and add an AAAA record only if IPv6 is intentionally enabled.
  4. For a hostname-based setup, create the requested CNAME, commonly for www or another subdomain.
  5. Handle the root domain separately if the provider gives different instructions for example.com and www.example.com.
  6. Confirm that the hosting account recognizes the domain and that an SSL certificate is issued. DNS pointing alone does not guarantee HTTPS is ready.

Changing nameservers can be appropriate when moving DNS management, but it transfers responsibility for the whole zone. Recreate required records first, especially MX, SPF, DKIM, DMARC, verification, and subdomain records. For broader launch tasks, use the small business website launch checklist.

To set up business email

  1. Get the exact MX hostnames and preference values from your email provider.
  2. Remove obsolete MX records unless the provider specifically requires multiple destinations.
  3. Add the provider's SPF record as TXT at the root domain. Maintain one SPF policy rather than publishing several separate SPF records.
  4. Generate or copy DKIM records from the email provider. DKIM commonly uses a selector subdomain such as selector1._domainkey.
  5. Add a DMARC TXT record at _dmarc, beginning with a reporting or monitoring approach that matches your ability to review results.
  6. Send test messages to and from an external mailbox, then check authentication results and delivery.

Provider instructions differ, so do not substitute guessed values for MX, DKIM, or SPF data. The business email domain setup guide covers the relationship between these records and deliverability in more detail.

To verify domain ownership

  1. Copy the verification record exactly, including the host name, record type, and token.
  2. Choose TXT unless the service explicitly requests CNAME or another type.
  3. Check whether the provider expects the token at the root, a named subdomain, or a path-specific hostname.
  4. Save the record, wait for it to become visible, and then select the provider's verification action.
  5. Keep the record if the service uses it for ongoing ownership checks; remove it only when the service says it is no longer needed.

A TXT record can contain several unrelated entries at the same name. Do not overwrite existing verification or email records when adding a new one.

To authorize email senders and improve security

SPF identifies permitted sending infrastructure through a TXT policy. DKIM adds a cryptographic signature using a provider-published public key. DMARC tells receiving systems how to evaluate alignment between the visible From domain and authenticated mail, and where reports may be sent. These records work together; adding SPF alone is not a complete email-authentication setup.

Keep an inventory of every legitimate sender, including forms, customer-support platforms, marketing tools, and transactional email systems. Before tightening a DMARC policy, confirm that known senders pass authentication and alignment. An overly broad SPF policy or an unreviewed include can make future maintenance harder, so remove services that no longer send mail.

To publish an application or special service

Use SRV only when the application documents it. An SRV value normally includes priority, weight, port, and target, and the record name often contains both a service and protocol label. For certificate issuance controls, use CAA only after identifying the certificate authorities used by your website, CDN, hosting platform, or automated certificate process. A restrictive CAA record can prevent an otherwise valid certificate workflow if it omits a required issuer.

What to double-check

  • Authoritative location: Check the domain's nameservers before editing records. Registrar DNS and hosting DNS may be separate systems.
  • Hostname formatting: Determine whether the control panel automatically appends the domain. Accidentally entering a full name where a relative name is expected can create a duplicated hostname.
  • Existing records: Export or copy the zone first. Pay particular attention to MX, TXT, NS, CNAME, and records for subdomains such as mail, api, and www.
  • TTL: Time to live controls how long recursive resolvers may cache a response. A shorter TTL can make planned changes easier to adjust, but it does not force every resolver to refresh immediately.
  • Propagation: DNS changes become visible at different times because caches expire on their own schedules. Test from more than one network and use a DNS lookup tool that shows the record type and name you changed.
  • DNSSEC: If DNSSEC is enabled, verify that the delegation and signing state remain consistent after changing DNS providers or nameservers. An incorrect configuration can make a domain appear unavailable to validating resolvers.
  • HTTPS and application configuration: A correct DNS response does not configure the web server, virtual host, redirect, application URL, or SSL certificate. Check each layer separately.

When moving a site or changing providers, lower the relevant TTL ahead of a planned change where practical, preserve the old service until the new records and application are confirmed, and raise the TTL afterward if your operating model favors longer caching. DNS is only one part of a migration; the domain transfer checklist helps separate registrar changes from website and email changes.

Common mistakes

  • Replacing the entire zone: Switching nameservers without recreating email and service records can take mail, verification, or subdomains offline.
  • Using a CNAME where an A record is required: An IP address belongs in A or AAAA. A hostname belongs in CNAME.
  • Publishing multiple SPF records: Combine authorized mechanisms into one SPF policy according to the sender's instructions instead of adding competing policies.
  • Deleting unknown TXT records: A token may support an active service even if its purpose is not obvious. Identify it before removal.
  • Adding an unintended AAAA record: If IPv6 is published but the server is not correctly configured, some visitors may receive a broken connection while IPv4 users work normally.
  • Testing too soon: A local cache can show an old answer, while another resolver has the new one. Check the authoritative answer and allow for TTL-based caching.
  • Confusing DNS with hosting: DNS directs traffic; it does not upload files, create a mailbox, install WordPress, or issue every required certificate.

For a website performance change, also distinguish DNS from caching and content delivery. The CDN and hosting cache comparison explains why a DNS change may be only the first step.

When to revisit

Keep this checklist with your domain records and review it whenever a service is added, removed, or moved. Revisit DNS before a website launch, hosting migration, registrar transfer, email-provider change, CDN rollout, certificate change, or application redesign. It is also worth reviewing before seasonal planning cycles when traffic, campaigns, or temporary services may change.

At each review, export the current zone, list every active sender and subdomain, confirm that website and email tests pass, and remove records that no longer have an owner. Recheck provider documentation when workflows or control panels change; field names and required values are provider-specific even when the underlying DNS record type is standard.

Use this final action list before saving an edit:

  1. Write down the intended hostname, record type, value, and TTL.
  2. Confirm the authoritative DNS provider and preserve the current record.
  3. Change only the record required for the task.
  4. Test the authoritative result and then test from an independent network.
  5. Check the website, HTTPS, email sending, email receiving, and any affected application.
  6. Record what changed, when it changed, and why.

A small DNS inventory and a cautious change process make future troubleshooting much faster. If the change affects certificates, pair this guide with the SSL certificate management checklist, and keep a backup and restore plan for the application itself.

Related Topics

#DNS#domain security#email setup#domain verification#DNS records
N

Name Host Studio

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.