DNS Records for Websites Explained: A Maintenance and Troubleshooting Reference
DNS is the control layer that connects a domain to a website, email service, verification workflow, or hosting platform. This guide explains which DNS records websites commonly need, how to change them safely, how to verify propagation, and which checks to repeat when you change hosts, add subdomains, or troubleshoot an outage.
Overview
The Domain Name System translates readable names such as example.com into information that browsers and other services can use. Your registrar may provide the DNS controls, or your domain may use nameservers operated by a separate DNS provider. Before changing a record, identify where the authoritative DNS zone is managed. Editing records at the registrar will have no effect if the domain delegates DNS to another provider.
A typical website uses an A record for an IPv4 address or a CNAME record for a hostname supplied by a hosting platform. A secure site also needs the hosting platform to issue and renew its TLS certificate, although certificate validation may require a temporary DNS record. Email uses a different set of records, particularly MX, SPF, DKIM, and DMARC-related TXT records.
DNS changes are not the same as redirects. DNS points a name to a service; an HTTP redirect tells a browser to request a different URL. Redirects are normally configured in a web server, hosting dashboard, CDN, or application. Adding a DNS record cannot by itself redirect example.com to www.example.com.
What to track
Keep a simple inventory of every active record, its purpose, its owner, its TTL, and the date it was last reviewed. The following reference covers the records most often encountered in website DNS setup.
| Record | Purpose | Typical use | Important caution |
|---|---|---|---|
| A | Maps a hostname to an IPv4 address. | Pointing the root domain or a subdomain to a server. | Use the exact address supplied by the host. Remove obsolete addresses only after confirming they are no longer needed. |
| AAAA | Maps a hostname to an IPv6 address. | Serving a site over IPv6. | An incorrect AAAA record can make some visitors fail even when the A record is correct. Add IPv6 only when the destination supports it. |
| CNAME | Aliases one hostname to another hostname. | Connecting www, a hosted site, or a service subdomain. | Do not place a CNAME beside another record with the same name. Root-domain CNAME support varies by provider and may use a different label. |
| MX | Specifies where mail for a domain should be delivered. | Connecting a hosted email service. | Changing MX records can interrupt mail delivery. Copy every required destination and priority value before editing. |
| TXT | Stores text used for verification and email policy. | SPF, DKIM, DMARC, search-console verification, and certificate validation. | Do not overwrite an existing TXT record without checking its purpose. SPF should be maintained as one policy for a hostname rather than casually adding competing policies. |
| NS | Delegates DNS authority to nameservers. | Moving DNS management to a new provider or creating delegated subdomains. | A nameserver change affects the entire zone. Treat it as a migration, not as an ordinary record edit. |
| CAA | Specifies which certificate authorities may issue certificates for a domain. | Restricting certificate issuance. | Confirm that the certificate provider and any validation method are compatible before adding or tightening CAA rules. |
| Redirect | Forwards an HTTP request to another URL. | Sending the apex domain to www, or retiring an old page. | Configure it in the hosting, CDN, or web server layer. It is not a DNS record. |
Record-change templates
Use the provider's field labels rather than copying a zone-file format blindly. A common website pattern looks like this:
- Root domain: add an A record with host or name
@and the IPv4 address supplied by the host. - IPv6: add an AAAA record with host
@only when the host supplies a working IPv6 address. - WWW hostname: add a CNAME with host
wwwand the destination hostname supplied by the hosting platform. - Mail: add each required MX record with its exact priority, then add the provider's TXT records for SPF, DKIM, or verification.
- Certificate validation: add the requested TXT or CNAME record exactly, including the full token and required host name.
Leave unrelated records in place until you understand them. Old entries may belong to email, analytics, a staging environment, a domain verification process, or a subdomain that is not visible from the main website.
Cadence and checkpoints
DNS does not need daily attention, but it benefits from a repeatable review. Review the zone quarterly for a small business, portfolio, or static site, and review it whenever infrastructure changes. A monthly check is appropriate for teams that frequently deploy projects, add services, or manage several domains.
Before changing DNS
- Record the current zone or export it if the provider supports an export function.
- Confirm the authoritative nameservers with a trusted lookup tool and log in to that DNS provider.
- Write down the intended change, the expected destination, and the person or service responsible for it.
- Check for conflicting records at the same hostname, especially A, AAAA, and CNAME records.
- Check whether the change affects email, certificate validation, subdomains, or a staging site.
- Lower the TTL in advance only when you have a reason to make rollback faster. A lower TTL does not erase cached answers immediately.
After changing DNS
Query the record directly against several public resolvers and, where possible, the authoritative nameserver. Tools such as dig, nslookup, and provider lookup pages can show whether the intended answer is visible. Check both the root domain and www, test IPv4 and IPv6 separately, and visit the site over HTTPS. For email changes, send a test message in both directions and inspect delivery results rather than relying only on a DNS lookup.
Propagation is not a single global event. Recursive resolvers may retain an older answer until its cached TTL expires, and local operating systems, browsers, networks, and security products can add their own caching behavior. If the authoritative answer is correct but one network still shows the old value, compare results from another resolver before changing the record again.
Rollback checklist
If the site or email fails, pause further edits. Compare the current zone with your pre-change copy, restore the previous value, and verify the authoritative answer first. Then test from more than one network. Keep a short incident note containing the time of the change, the old and new values, observed errors, and the recovery step. This record makes the next change safer.
How to interpret changes
A website outage after an A-record change usually indicates an incorrect address, a missing web-server configuration, or a host that has not yet accepted the domain. If www works but the root domain does not, inspect the root record separately; they are independent names. If the root works but www fails, inspect the CNAME and confirm that the hosting platform recognizes the custom domain.
Intermittent failures deserve special attention to AAAA records. Some visitors may prefer IPv6, so a stale or unreachable AAAA destination can produce failures that do not appear on IPv4-only tests. Remove or correct the AAAA record only after confirming whether IPv6 is intended.
Email problems should be investigated separately from web hosting. MX determines delivery destinations, while TXT records may support SPF, DKIM, DMARC, or provider verification. A website can remain fully available while an MX or email-authentication mistake prevents messages from arriving or causes them to be treated suspiciously.
Certificate errors may involve DNS, hosting configuration, or both. Confirm that the domain resolves to the intended host, that the host has the domain added to its project, and that any requested validation record is present exactly. CAA restrictions can also affect issuance when they do not permit the certificate authority being used. Avoid deleting CAA or validation records without documenting why they exist.
For a deeper operational routine, pair this review with a website maintenance schedule for free cloud hosting, and use the custom domain and HTTPS checklist when launching a site. If you deploy from Git, verify DNS after the deployment target changes using the static website deployment guide.
When to revisit
Revisit this reference before and after any domain migration, host change, nameserver update, email-provider change, or HTTPS renewal issue. It is also useful when adding a subdomain, launching a landing page, connecting a portfolio site, retiring an old service, or auditing a zone for stale records. At minimum, schedule a quarterly review of active records and ownership, with a lighter monthly check if your infrastructure changes frequently.
Refresh your internal notes whenever a provider changes its control-panel terminology or validation process. Recheck email authentication guidance, IPv6 support, certificate validation methods, and resolver behavior periodically rather than assuming that an old screenshot or procedure still matches the current interface. DNS records are small, durable pieces of configuration; treating them as documented infrastructure is the simplest way to reduce avoidable outages.
A practical next step
- List your domain's authoritative nameservers.
- Export or copy the current records.
- Label each record by purpose and owner.
- Remove nothing until its purpose is confirmed.
- Make one planned change at a time.
- Verify authoritative, public, website, HTTPS, and email results.
- Record the final state and set the next review date.