DNS records connect a domain to websites, email systems, verification services, and other network destinations. This practical guide explains what A, AAAA, CNAME, MX, TXT, NS, and SRV records do, what to enter in each field, how long changes may take to appear, and how to troubleshoot common conflicts.
Overview
The Domain Name System, or DNS, translates human-readable names such as example.com into information that browsers and other services can use. A website may depend on one DNS record for its main address, several records for subdomains, multiple records for email delivery, and TXT records for verification or email authentication.
DNS is usually managed at the provider responsible for your domain’s DNS zone. That provider may be your domain registrar, cloud hosting company, website builder, or a separate DNS service. Before changing anything, identify where the authoritative DNS zone is managed. Editing records at the wrong provider will not change the live configuration.
There are two common ways to connect a domain to a service:
- Edit individual records: Keep the current nameservers and add or update records in the existing DNS zone.
- Change nameservers: Delegate DNS management to another provider, which then becomes responsible for the zone and its records.
Changing nameservers is broader than adding an A or CNAME record. It can affect the website, email, verification records, and any other service using the domain. Record changes should therefore be treated as an operational task, not just a form-field update.
What to track
Use the following reference table when deciding which DNS record you need. The exact labels in a provider’s dashboard may differ, but the underlying fields are usually similar.
| Record | Purpose | Typical value | Important detail |
|---|---|---|---|
| A | Points a hostname to an IPv4 address | 198.51.100.24 | Use an IPv4 address, not a URL or hostname. |
| AAAA | Points a hostname to an IPv6 address | An IPv6 address | Use only when the destination provides a usable IPv6 address. |
| CNAME | Aliases one hostname to another hostname | app.host.example | Use a hostname, not an IP address. A CNAME commonly applies to a subdomain. |
| MX | Identifies mail servers for a domain | mail.provider.example | MX records include a priority value; lower numbers generally indicate preference. |
| TXT | Stores text used for verification and policy data | site-verification=... | Copy the value exactly, including punctuation and any required quotation handling. |
| NS | Identifies authoritative nameservers | ns1.dns-provider.example | Nameserver changes delegate DNS control and may replace the existing zone. |
| SRV | Specifies a service location and connection details | Priority, weight, port, and target | Follow the service provider’s required name and field order precisely. |
A and AAAA records
An A record is the usual choice when a hosting provider gives you an IPv4 address for the root domain or a subdomain. An AAAA record serves the same general purpose for IPv6. If a provider gives you an IP address, do not paste it into a CNAME field. If it gives you a hostname, do not convert that hostname into an invented IP address.
The root or apex domain can be displayed by a DNS dashboard as @, a blank host field, or the full domain name. Confirm the dashboard’s convention before saving. A record for www applies to www.example.com, not automatically to the root domain.
CNAME records
A CNAME record is useful when a service provides a destination hostname, such as a hosted site endpoint. A common setup uses a CNAME for www while the root domain uses an A record or a provider-specific alias feature. CNAMEs can also be used for subdomains such as blog, shop, or status.
Do not assume that every DNS provider supports a conventional CNAME at the root domain. Some providers offer an equivalent feature under names such as ALIAS or ANAME. Use the hosting provider’s documented method rather than adding multiple competing records.
MX and TXT records for email
MX records determine where incoming mail for a domain should be delivered. Email providers commonly supply one or more mail hostnames and a priority for each. Preserve all required MX records and enter the priority exactly as instructed. Do not point an MX record to an IP address unless the provider explicitly requires a supported format.
TXT records have several uses. A service may request one to prove domain ownership, while email providers may use TXT values for sender policies or message-signing configuration. Because a TXT value is often an exact token, copying it manually can introduce errors. Keep a record of which service requested each TXT value and remove obsolete verification entries only after confirming they are no longer needed.
Nameservers and SRV records
Nameservers tell the internet which DNS servers are authoritative for the domain. When you change them, the new provider must contain every record the domain still needs. Before switching, copy the existing zone or create the required website, email, verification, and subdomain records in the new provider’s dashboard.
SRV records are used by services that need more than a hostname, such as a port and connection preference. Their labels can include service and protocol prefixes, so do not guess the host field. Copy the provider’s complete example and verify priority, weight, port, and target separately.
Cadence and checkpoints
DNS does not require daily monitoring for every site, but it deserves a repeatable review process. Keep a simple inventory containing the hostname, record type, value, purpose, owner, and date last reviewed. This makes unexpected entries easier to identify during a migration or security review.
Before a change
- Confirm where authoritative DNS is managed.
- Record the current values before editing.
- Check whether the change affects the root domain, a subdomain, email, or a verification workflow.
- Read the destination provider’s instructions and note whether it requires a trailing dot, a specific host format, or a particular TTL.
- Reduce the chance of an outage by scheduling changes when you can test the result and restore the previous value if necessary.
After a change
Test the exact hostname that changed, not just the root domain. Open the website over HTTPS, send and receive a test email when mail records changed, and repeat any domain-verification step requested by the service. DNS answers can be cached, so different networks may show old and new results during the transition.
A TTL, or time to live, tells resolvers how long an answer may be cached. A shorter TTL can make planned changes easier to roll back, while a longer TTL can reduce the frequency of lookups. Treat TTL as a planning setting rather than a guarantee of instant propagation. The actual experience also depends on existing cached answers and the behavior of individual resolvers.
How to interpret changes
When a website stops resolving after a DNS edit, first check whether the record was added to the authoritative provider. Then check the hostname, type, and value character by character. Frequent causes include entering www twice, placing a full domain name in a field that automatically appends the domain, using a CNAME where an IP address is required, or leaving an old record that conflicts with the new one.
For email problems, review MX records before changing TXT records. Confirm that the mail hostnames and priorities match the provider’s instructions, and check that no old mail service is still receiving preference. If messages are sent but authentication or verification fails, inspect the relevant TXT value and confirm that it belongs to the current provider.
For a nameserver migration, compare the records at the old and new providers. A site may appear to work while email is broken because the new zone contains the web record but not the MX records. Similarly, a domain-verification TXT record can be lost during a nameserver change even when the website loads correctly.
Use independent DNS lookup tools or command-line queries to compare answers from more than one resolver. If results differ, note the resolver, queried hostname, record type, and time. This creates a useful timeline instead of relying on a single browser test. Do not keep making additional edits while waiting unless you have identified a specific error; repeated changes can make the final state harder to diagnose.
When to revisit
Review DNS records at least quarterly for active business domains, and revisit them immediately when a recurring operational event occurs. A lightweight quarterly review can identify forgotten verification records, retired subdomains, incorrect mail destinations, and nameservers that no longer match the team’s documented setup.
Open this checklist before connecting a new website builder, moving to cloud web hosting, changing email providers, adding a subdomain, renewing a service, or completing a website migration. It is also useful after a staff or provider change, because DNS access and ownership can otherwise become unclear.
For the next change, follow this sequence:
- Write down the requested hostname, record type, value, priority, and TTL.
- Identify the authoritative nameservers and make the change in that DNS zone.
- Save a dated copy of the previous record and the new configuration.
- Test the affected website, subdomain, email flow, or verification process.
- Check again from another network or resolver after the expected caching window.
- Update your DNS inventory and remove only records confirmed to be obsolete.
For broader launch work, pair this DNS review with a business website launch preflight checklist. If you are changing providers, consult the website hosting migration checklist and confirm that backups and recovery steps are current before making DNS the final switch.