Connecting a domain to web hosting is usually a DNS task, not a domain transfer. This guide explains which records to change, how to preserve email and existing services, how TTL affects propagation, and how to troubleshoot A, AAAA, CNAME, MX, TXT, and nameserver changes safely.
Overview
When you register a domain, the registrar manages the registration and often provides a DNS control panel. Your web host stores the website files and provides one or more destinations, such as an IPv4 address, IPv6 address, or hostname. DNS connects the two by answering questions such as where example.com should load and where email for that domain should be delivered.
There are two common ways to point a domain to web hosting:
- Change individual DNS records. Keep DNS at the registrar or current DNS provider and update the website records supplied by the new host. This is usually the safer choice when email, verification records, subdomains, or other services are already in use.
- Change nameservers. Replace the domain’s authoritative nameservers with those supplied by the new host. The host then manages the complete DNS zone. This can be convenient, but every required record must exist in the new zone before the change.
Before making either change, record the current DNS configuration. In particular, note the A, AAAA, CNAME, MX, TXT, and any service-specific records. Do not delete MX or email authentication records simply because you are moving the website. Web hosting and email hosting can be provided by different companies.
What to track
DNS record reference
| Record | Purpose | Typical website or service use | Important caution |
|---|---|---|---|
| A | Maps a hostname to an IPv4 address | Root domain or subdomain pointing to a server | Use the exact address supplied by the host; do not guess. |
| AAAA | Maps a hostname to an IPv6 address | Web access over IPv6 | Remove or correct a stale record if IPv6 sends visitors to the wrong server. |
| CNAME | Points a hostname to another hostname | www, hosted applications, and verification targets | A CNAME generally cannot coexist with other records at the same hostname. |
| MX | Specifies mail servers for the domain | Receiving email | Changing website DNS does not normally require changing MX records. |
| TXT | Stores text used for verification and policy | SPF, DKIM, DMARC, ownership checks, and service setup | Preserve unrelated TXT values and follow the provider’s formatting instructions. |
| NS | Identifies authoritative nameservers | Delegating DNS management to a provider | A nameserver change moves responsibility for the whole DNS zone. |
Track more than the record value. Keep a simple change log containing the hostname, record type, old value, new value, TTL, date, reason, and person who approved the change. Also record where the domain is registered, where DNS is hosted, where email is hosted, and which account owns each service. This information reduces confusion during a migration or incident.
Preserve email authentication
If email is active, review MX and TXT records before changing nameservers. SPF is commonly published as TXT, while DKIM may use one or more selector-based TXT or CNAME records. DMARC is also published as TXT, usually under a host beginning with _dmarc. These records belong to email operations and should be copied accurately when moving DNS. Avoid creating a second competing SPF policy; consolidate authorized senders according to the email provider’s instructions.
Cadence and checkpoints
Registrar-to-host setup workflow
- Confirm the target. Obtain the host’s exact A, AAAA, or CNAME instructions. Check whether the root domain and
wwwhostname require different records. - Identify the current DNS provider. The registrar, web host, and DNS provider may be separate. Make changes in the system that currently hosts the authoritative zone unless you are intentionally changing nameservers.
- Back up the zone. Export it if the provider supports exports, or copy records into a secure change log. Include records for email, verification, staging, APIs, and other subdomains.
- Prepare the new hosting account. Add the domain in the host dashboard and confirm that the site responds using the host’s temporary URL or preview method, if available. Configure the certificate after the domain resolves to the host.
- Lower TTL before a planned migration. A shorter TTL can make future changes easier to roll back, but it does not erase caches that already received the previous TTL. Make this adjustment ahead of the cutover rather than immediately afterward.
- Change only the necessary records. Update the A and, where applicable, AAAA records for the root domain. Update the
wwwCNAME or A record as instructed. Leave MX, TXT, and unrelated subdomains unchanged. - Test from multiple networks. Check the site using a normal browser, a mobile connection, and DNS lookup tools. Test both the root domain and
www, plus important subdomains. - Complete the cutover. Confirm HTTPS, redirects, forms, login areas, APIs, and email sending and receiving. Keep the previous hosting available until the new site is verified and rollback is no longer needed.
If you choose to change nameservers, first recreate the complete DNS zone at the new provider. Verify that the new zone contains website records, MX records, email authentication, verification records, and all required subdomains. Only then update the nameserver delegation at the registrar.
TTL and propagation checkpoints
TTL, or time to live, tells recursive DNS resolvers how long they may cache a response. It is not a guaranteed publication time. Some resolvers may continue returning the old value until their cached response expires, while others may query the new value sooner. Many changes become visible across common networks within minutes or hours, but nameserver changes and stale caches can take longer. Plan for overlap rather than relying on an exact deadline.
Check authoritative nameservers separately from public recursive resolvers. If the authoritative answer is correct but a public resolver is old, the change is probably still propagating. If authoritative nameservers disagree, the DNS zone or delegation needs attention.
How to interpret changes
Use this decision tree when the domain does not behave as expected:
- The domain does not resolve at all: Check nameserver delegation, expiration or hold status, and whether the zone contains the expected root record.
- The root domain works but
wwwfails: Inspect thewwwA or CNAME record. Confirm that the hostname is entered correctly and that the host has added it to the account. - Some networks show the old site: Compare authoritative results with several recursive resolvers. Check TTL and wait for caches to expire before making repeated edits.
- Visitors using IPv6 reach the wrong site: Inspect the AAAA record. An accurate A record does not correct a stale or incorrect IPv6 destination.
- The website works but email stops: Review MX records first, then SPF, DKIM, and DMARC TXT or CNAME records. A nameserver change may have replaced the old email records with an incomplete zone.
- HTTPS shows a certificate warning: Confirm that the hostname resolves to the intended host, the domain is added to the hosting account, and the certificate covers both the root domain and required subdomains.
- A record changes have no effect: Check for an active CNAME, proxy, redirect, CDN, load balancer, or application-level configuration that may be controlling the response instead.
Do not troubleshoot by changing several record types at once. Make one controlled change, document it, test authoritative and recursive answers, and then move to the next hypothesis. This prevents a DNS problem from becoming an audit problem.
When to revisit
Review your domain and DNS record inventory monthly or quarterly, and always revisit it before a hosting migration, email-provider change, website rebuild, CDN rollout, or subdomain launch. A practical review should confirm:
- The registrar, DNS provider, web host, and email provider are still correctly recorded.
- Nameserver delegation matches the intended DNS provider.
- A, AAAA, and CNAME records point to active destinations.
- MX, SPF, DKIM, and DMARC records still reflect current email systems.
- Unused verification records, staging subdomains, and old host references are identified before removal.
- DNS changes, domain renewals, SSL status, and account ownership are documented.
Refresh this checklist whenever your registrar or hosting provider changes its dashboard or setup instructions, because labels and workflows can differ. For broader renewal and ownership controls, see the domain portfolio management calendar and the domain portfolio management checklist. If the site is slow after the DNS work is complete, continue with the web hosting performance diagnostic guide.
Before your next change, save the current zone, identify every service that depends on the domain, change only the required records, and test from more than one network. That small operating habit makes connecting a domain to web hosting safer, easier to reverse, and easier to maintain over time.