Connecting a new domain to a website or email service usually requires only a few DNS changes, but the correct records depend on your setup. This guide explains A, AAAA, CNAME, MX, TXT, and NS records, then provides a practical checklist for changing nameservers, setting TTL, verifying propagation, and avoiding conflicts that can take a site or mailbox offline.
Overview
DNS, or the Domain Name System, translates a domain such as example.com into the servers that handle its website, email, and other services. Your registrar may provide DNS management, or your hosting, CDN, or security provider may host the DNS zone instead.
Before editing anything, identify where the domain’s authoritative DNS is managed. The active nameservers determine which DNS provider’s records are used. Adding an A record at your registrar will not affect the domain if its nameservers point to a different provider.
The two main ways to connect a domain are:
- Edit individual records: Keep the current DNS provider and add or update records supplied by your website or email provider.
- Change nameservers: Delegate DNS management to another provider. This can be convenient, but the new DNS zone must contain every record the domain still needs.
Use this quick reference when a provider gives you setup instructions:
| Record | Purpose | Typical use | Important detail |
|---|---|---|---|
| A | Maps a hostname to an IPv4 address | Website at the root domain | Enter the exact IPv4 address supplied by the host |
| AAAA | Maps a hostname to an IPv6 address | Website or service using IPv6 | Do not substitute an IPv4 address |
| CNAME | Points one hostname to another hostname | www pointing to a hosting target | It is not an IP address and may conflict with other records |
| MX | Identifies mail servers for a domain | Receiving email | Priority numbers determine preference |
| TXT | Stores text used for verification and email policy | SPF, DKIM, DMARC, and service verification | Copy the full value exactly |
| NS | Delegates DNS authority | Changing DNS providers | Nameserver changes affect the whole DNS zone |
For a printable record reference, see the DNS records cheat sheet. The correct values always come from the service you are connecting; do not guess an address, hostname, or verification string.
Checklist by scenario
Connecting a website while keeping your current DNS provider
- Confirm whether the host requires an A record, AAAA record, CNAME, or a combination.
- Record the existing DNS entries before making changes. A screenshot or exported zone file can help with recovery.
- For the root domain, often shown as
@, add the exact A or AAAA value supplied by the host. Some providers use a special approach for root-domain CNAME behavior, so follow their instructions rather than assuming a standard CNAME is supported. - For
wwwor another subdomain, add the requested CNAME or address record. - Remove only obsolete records. Do not delete mail, verification, subdomain, or security records simply because they are unrelated to the website.
- Test both the root domain and the
wwwversion, including HTTPS if the host provides certificates.
Connecting email to a domain
- Obtain the email provider’s MX hostnames and priority values. There may be more than one MX record.
- Remove old MX records only when you are certain the domain is moving to a new mail system. Leaving old and new mail servers together can route messages unpredictably.
- Add the provider’s TXT records for domain verification and email authentication. SPF, DKIM, and DMARC serve different purposes and may use different hostnames.
- Check whether an SPF record already exists before adding another. A domain should generally have one combined SPF policy rather than multiple separate SPF records.
- Send test messages in both directions and inspect the receiving system’s authentication results when possible.
Changing nameservers
- Create the new DNS zone before changing the delegation. Copy required website, email, verification, subdomain, and security records from the current provider.
- Check the new zone for the root domain,
www, mail hostnames, and any operational subdomains such as a dashboard or API endpoint. - At the registrar, replace the current nameservers with the exact nameserver hostnames supplied by the new DNS provider.
- Do not add nameservers from two unrelated providers unless both providers explicitly support that arrangement. A mixed set can produce inconsistent answers.
- Verify delegation using a DNS lookup tool and test the website and email after the change.
Changing nameservers is different from changing an A record. It moves authority for the entire zone, so it deserves a written inventory and a rollback plan. If you are moving the domain between registrars rather than changing DNS, use this domain transfer guide and keep DNS management separate from the registrar transfer where possible.
What to double-check
Host or name fields
DNS dashboards label fields differently. A root-domain entry may be shown as @, the full domain, or a blank field. A provider may ask for www, mail, or a verification token as the host. Follow the dashboard’s format and avoid entering the domain twice if the interface automatically appends it.
Record conflicts
A hostname cannot normally have a CNAME alongside other record types at the same name. For example, do not keep a CNAME for www while also adding an A record for www. The root domain can also have special restrictions depending on the DNS provider. If two services need the same hostname, use the integration method recommended by those services rather than stacking conflicting records.
TTL and propagation
TTL, or time to live, tells recursive DNS resolvers how long they may cache an answer. A shorter TTL can make planned changes easier to adjust, while a longer TTL can reduce repeated lookups. It does not force every resolver to update immediately. Before a planned migration, reduce the TTL in advance if your provider and workflow support it; after confirming the change, restore a sensible value.
Propagation is not a single global event. Different networks may show old and new answers while cached values expire. Check from more than one location with a DNS lookup or propagation checker, but also test the actual website and mail service. A checker can confirm DNS answers without proving that an application, certificate, firewall, or mail account is configured correctly.
Security and ownership
Protect the registrar and DNS provider accounts with multifactor authentication, unique passwords, and restricted access. Keep recovery details current and enable registrar or domain locks where appropriate. DNSSEC may add another layer of protection against certain forms of DNS tampering, but it must be configured consistently: incorrect signing or stale delegation records can make a domain fail to resolve.
For broader account controls, review the domain registrar account security checklist. DNS changes should be logged with the date, operator, reason, old value, and new value.
Common mistakes
- Editing the wrong DNS provider: The dashboard you opened may not be authoritative. Confirm the domain’s active nameservers first.
- Replacing the whole zone for a website change: A website connection usually needs only specific record updates. Deleting MX or TXT records can interrupt email and verification.
- Using the wrong record type: An A record needs an IPv4 address, an AAAA record needs an IPv6 address, and a CNAME needs a hostname. They are not interchangeable.
- Adding duplicate SPF records: Combine authorized senders according to the email provider’s instructions instead of publishing separate SPF policies.
- Forgetting subdomains: Test the root domain,
www, and any service subdomains your business uses. - Changing nameservers without copying records: The new provider starts with an incomplete zone unless you build it first.
- Assuming propagation caused every error: Check for spelling mistakes, incorrect priorities, application settings, certificate issues, and firewall restrictions as well.
- Making several changes at once: Change one logical group, record the result, and wait for verification. This makes troubleshooting much easier.
When to revisit
Return to this checklist before launching a new site, changing hosting, moving email providers, adding a CDN, enabling a verification service, or changing nameservers. Revisit it during seasonal planning cycles when teams review domains, renewal settings, access permissions, and business continuity procedures.
Service providers can change their required hostnames, authentication records, or setup screens. Before making a change, open the provider’s current documentation and compare it with your saved DNS inventory. This is especially important for email authentication, where an outdated TXT value may no longer match the service configuration.
Use this final run-through before saving a DNS change:
- Identify the authoritative DNS provider.
- Export or document the current zone.
- Copy the provider’s exact record type, name, value, and priority.
- Check for conflicts and duplicate email policies.
- Choose a suitable TTL and schedule the change if downtime matters.
- Verify from multiple DNS locations after cached answers have had time to expire.
- Test the website, HTTPS, inbound email, outbound email, and important subdomains.
- Record what changed and keep the previous values until the migration is confirmed.
For related domain-management planning, see the guides on registering a domain for a business and reviewing renewal costs. A current DNS inventory, secure account access, and a tested rollback path turn DNS work from guesswork into a repeatable maintenance task.