Use this DNS records cheat sheet to connect a domain to cloud hosting, a static website, an application behind a CDN or load balancer, SaaS subdomains, and business email. It includes reusable zone-file examples, DNS-panel equivalents, a nameserver cutover workflow, and an audit checklist you can revisit whenever infrastructure changes.
Overview
DNS translates human-readable names such as example.com into the destinations used by browsers, mail servers, APIs, and other services. A domain can point to several systems at once: the root domain can serve a website, app.example.com can route to a cloud application, and mail records can direct email to a separate provider.
The exact values depend on your hosting, CDN, application, and email vendors. Treat the examples below as editable templates, not values to copy without replacing the placeholders. A provider may ask you to use an IP address, hostname, verification token, or specially formatted record. Use the value supplied by that provider as the source of truth.
Before editing DNS, record the current zone. Confirm which nameservers are authoritative, identify every production hostname, and note dependencies such as SSL certificate validation, transactional email, monitoring, and third-party verification. For broader domain inventory and security work, see the domain portfolio management checklist.
Common record types
| Record | Purpose | Typical value |
|---|---|---|
| A | Maps a name to an IPv4 address. | 203.0.113.10 |
| AAAA | Maps a name to an IPv6 address. | 2001:db8::10 |
| CNAME | Aliases a hostname to another hostname. | target.provider.example. |
| MX | Specifies mail delivery servers and their priority. | 10 mail.example.net. |
| TXT | Stores verification and policy text, including SPF, DKIM, and DMARC. | "v=..." |
| CAA | Restricts which certificate authorities may issue certificates for a domain. | 0 issue "ca.example" |
| SRV | Publishes a service hostname, port, priority, and weight. | 0 5 443 service.example. |
| NS | Delegates a domain or subdomain to authoritative nameservers. | ns1.dns-provider.example. |
DNS panels often hide the trailing dot used in zone files and may automatically append the domain name. Enter a fully qualified hostname only when the panel documentation calls for one. A value entered as www commonly means www.example.com, while a value entered as www.example.com. is already complete in zone-file syntax.
Checklist by scenario
1. Static website on cloud hosting
Use the A and AAAA values supplied by the hosting platform when it gives you fixed addresses. If the platform supplies a hostname instead, use the requested CNAME, usually on a subdomain such as www. Some DNS providers do not allow a conventional CNAME at the zone apex, so follow the hosting provider's recommended apex setup.
$ORIGIN example.com.
$TTL 300
@ IN A 203.0.113.10
@ IN AAAA 2001:db8::10
www IN CNAME example.com.
; Add provider-specific verification or SSL records separately
- Confirm the hosting platform has the domain attached to the site.
- Decide whether both the apex and
wwwshould work, then configure one as the canonical redirect. - Complete the platform's SSL verification after DNS resolves.
- Test the apex,
www, HTTP-to-HTTPS redirect, and a known asset path.
2. Web application behind a CDN or load balancer
For a managed CDN or load balancer, the normal pattern is a CNAME from the public hostname to the provider's assigned hostname. If you operate your own cloud VPS or load balancer with fixed addresses, use A and, where configured, AAAA records instead. Keep the application origin private where the architecture permits, and configure the CDN or load balancer with the correct origin, certificate, health check, and forwarding rules.
$ORIGIN example.com.
$TTL 300
@ IN CNAME edge.provider.example.
www IN CNAME edge.provider.example.
api IN CNAME api-edge.provider.example.
; Provider verification token, if required
@ IN TXT "provider-verification=REPLACE_ME"
Apex CNAME behavior varies by DNS provider. Some offer an equivalent feature under names such as ALIAS, ANAME, or flattened CNAME. Do not create competing A, AAAA, and CNAME records for the same name unless your provider explicitly documents that behavior.
3. SaaS application subdomain
Keep a SaaS product on a dedicated hostname, such as app.example.com, portal.example.com, or status.example.com. This limits the change to the service's subdomain and makes ownership easier to audit.
$ORIGIN example.com.
$TTL 300
app IN CNAME customer-id.saas-provider.example.
; Verification record requested by the SaaS provider
app IN TXT "service-verification=REPLACE_ME"
- Add the domain inside the SaaS administration console before relying on the DNS record.
- Check whether the provider expects the TXT record at
app, the root, or a separate selector. - Confirm that the service has issued or attached an SSL certificate for the exact hostname.
- Remove obsolete verification records only after the service no longer needs them.
4. Business email with SPF, DKIM, DMARC, and MX
Email requires more than an MX record. MX directs incoming mail; SPF describes approved sending services; DKIM lets a sender sign messages; and DMARC tells receiving systems how to evaluate authentication results and where to send reports. The exact SPF include, DKIM selector, and DMARC policy must come from your mail provider.
$ORIGIN example.com.
$TTL 3600
@ IN MX 10 mx1.mail-provider.example.
@ IN MX 20 mx2.mail-provider.example.
@ IN TXT "v=spf1 include:spf.mail-provider.example ~all"
selector1._domainkey IN TXT "v=DKIM1; k=rsa; p=REPLACE_WITH_PUBLIC_KEY"
_dmarc IN TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
Use one SPF TXT record for a domain. If several services send mail, combine their authorized mechanisms into one provider-approved SPF record rather than publishing multiple SPF records. DKIM can be a long TXT value, and some panels split it into quoted strings automatically. Start DMARC with a monitoring policy only when you can review reports and understand legitimate senders; strengthen the policy deliberately after testing. The email DNS setup guide covers these records and troubleshooting in more depth.
What to double-check
TTL planning
TTL controls how long resolvers may cache an answer. A shorter TTL can make a planned migration easier to observe, but it does not guarantee instant worldwide change. For routine records, a moderate TTL is usually easier to operate than permanently low values. Before a planned cutover, lower the relevant records in advance, make the change, verify the result, and restore a sensible TTL after the migration is stable.
Nameserver cutover without avoidable downtime
- Export or document the complete current DNS zone, including records for email, verification, monitoring, and subdomains.
- Create the same records at the new managed DNS provider. Replace only values that are intentionally changing.
- Compare the old and new zones line by line. Pay particular attention to MX, SPF, DKIM, DMARC, CAA, and service-specific records.
- Check the new authoritative nameservers directly with DNS tools before changing delegation.
- Lower TTLs ahead of the maintenance window where practical. Remember that parent-zone nameserver delegation and resolver caches may not change immediately.
- Update the registrar's nameserver delegation to the new provider.
- Monitor responses from multiple networks and test website, API, SSL, and email functions. Keep the old zone available until the transition is confirmed.
Changing nameservers is different from editing a record at the current provider. The new provider must contain the complete working zone before delegation changes. For registrar migrations, see how to transfer a domain without downtime.
DNSSEC and newer record types
DNSSEC adds signatures that help validate DNS responses, but it requires coordination between the authoritative DNS provider and the registrar's DS record. Enable it only when you understand the provider's key-management and rollover process. An incorrect DS record can make a domain fail validation, so plan disabling or changing DNSSEC carefully during a provider migration.
SVCB and HTTPS records can describe service endpoints and connection parameters for clients that support them. They are not a universal replacement for A, AAAA, or CNAME records. Use them only when a service specifically documents the required name and value, and verify that your DNS panel supports the record type without altering its syntax.
One-page DNS audit checklist
- □ Registrar account, renewal settings, and contact access are current.
- □ Authoritative nameservers are documented and expected.
- □ Apex,
www, application, API, and other production hostnames resolve correctly. - □ No stale A, AAAA, CNAME, MX, or TXT records point to retired infrastructure.
- □ SPF has one record and includes every legitimate sending service.
- □ DKIM selectors are current and mail is signing successfully.
- □ DMARC reporting addresses are monitored and the policy matches operational readiness.
- □ SSL certificates cover every public hostname and renew successfully.
- □ CAA, DNSSEC, and provider verification records are intentional and documented.
- □ A recent zone export and ownership notes are stored securely.
Common mistakes
- Putting a CNAME beside other records at the same name. A hostname with a CNAME generally should not also have A, AAAA, MX, or TXT data. Use the provider's documented alternative when the apex needs special handling.
- Replacing the whole zone during a hosting change. A website migration does not automatically move mail, verification, or monitoring records. Copy the full zone before changing only the intended destination.
- Publishing multiple SPF records. Combine authorized senders into one provider-supported SPF value and remove obsolete mechanisms carefully.
- Assuming TTL means immediate propagation. Cached answers, resolver behavior, and nameserver delegation can make the visible change take longer than expected.
- Using the wrong panel format. Some interfaces append the domain automatically, require a blank host field for the apex, or split long TXT values. Check the panel's field instructions.
- Forgetting IPv6. An incorrect AAAA record can send some visitors to an unreachable server even when the A record works. Publish AAAA only when IPv6 is configured and tested.
- Enabling DNSSEC without a recovery plan. Confirm key rollover and DS handling before changing authoritative providers.
When to revisit
Review this checklist before moving a website to new cloud hosting, adding a CDN or load balancer, launching a SaaS subdomain, changing email providers, transferring a domain, or altering authoritative nameservers. It is also useful before seasonal planning cycles, major application releases, and infrastructure ownership changes.
Schedule a recurring DNS audit at an interval that fits the size and risk of your domain portfolio. Revisit the records sooner when a vendor changes its DNS instructions, your mail delivery setup changes, a certificate renewal fails, or a cloud server is retired. Keep the zone export, service owners, expiration dates, and rollback notes together so the next change is an operational task rather than an investigation.
For the final launch pass, pair this reference with the domain-to-cloud-hosting connection guide, then confirm HTTPS and certificate coverage using the SSL and HTTPS audit guide. Only close the change after the public website, application endpoints, and inbound and outbound email have each been tested.