How to Connect a Domain to Web Hosting: Nameservers, DNS Records, and Verification
domainsweb hostingnameserversDNS recordswebsite launches

How to Connect a Domain to Web Hosting: Nameservers, DNS Records, and Verification

wwhata.cloud Editorial Team
2026-12-01
7 min read

A practical checklist for connecting a domain to web hosting with nameservers, A and CNAME records, DNS checks, and launch verification.

Connecting a domain to web hosting means directing your domain’s DNS records to the server or platform that delivers your website. This reusable checklist explains when to change nameservers, when to use A or CNAME records, how to verify the result, and what to check before declaring a site launch complete.

Overview

A domain registrar and a hosting provider perform different jobs. The registrar manages your domain registration, while the hosting provider stores and serves your website. DNS management connects the two by translating a hostname such as example.com into the server or service that should answer requests.

Before changing anything, collect these details from your hosting account:

  • The hosting provider’s nameservers, if it recommends delegating DNS management to its platform.
  • The public IPv4 address for the web server, if you will create an A record.
  • The IPv6 address, if the server and application are configured to support IPv6, for an AAAA record.
  • The target hostname for a CNAME record, such as a platform-provided application address.
  • Any required verification record, commonly a TXT or CNAME record.
  • The exact hostnames that should work, usually the root domain and www.

There are two main ways to point a domain to web hosting:

  1. Change nameservers: Your hosting or DNS provider becomes authoritative for the domain. You manage the domain’s DNS records in that provider’s control panel.
  2. Edit individual DNS records: You keep DNS management at the current provider and add or update A, AAAA, CNAME, and other records there.

Nameserver changes are convenient when one provider should manage the complete DNS zone. Individual records are useful when the existing DNS zone contains email, verification, or other services that must remain under the current DNS provider. Review your existing records before selecting either method. Changing nameservers without recreating necessary records can interrupt email and other services.

Checklist by scenario

Scenario 1: Your host provides nameservers

  1. Sign in to the hosting or managed DNS account and copy the nameserver values exactly.
  2. Open the domain’s nameserver or delegation settings at the registrar.
  3. Replace the current nameservers with the supplied values. Do not add unrelated nameservers unless the provider specifically instructs you to do so.
  4. Save the change and note the date, time, and previous values.
  5. Confirm that the new DNS provider contains the records you need, including website, email, verification, and any required subdomains.
  6. Wait for caches and resolvers to recognize the delegation change, then verify from more than one network or DNS lookup tool.

Use this route when your hosting provider is intended to manage the full DNS zone. It can simplify future website changes, but it also makes that provider’s DNS configuration the source of truth.

Scenario 2: You will keep DNS at the registrar or another DNS provider

  1. Open the authoritative DNS management panel for the domain. Changing records at a non-authoritative provider will not affect public DNS.
  2. For the root domain, create or update an A record that points to the hosting server’s IPv4 address.
  3. If IPv6 is configured and tested, create or update an AAAA record for the server’s IPv6 address.
  4. For www, use the record type recommended by the host. A CNAME pointing to the root domain or the host’s assigned target is common, but follow the platform’s instructions.
  5. Remove conflicting records for the same hostname when appropriate. Multiple A records may be intentional for traffic distribution, so do not delete them without understanding their purpose.
  6. Save the records and confirm that the hosting account recognizes the custom domain.

A basic record plan might look like this:

RecordHost or nameValueTypical purpose
A@ or blank203.0.113.10Points the root domain to an IPv4 server
AAAA@ or blank2001:db8::10Points the root domain to an IPv6 server
CNAMEwwwexample.comAliases a subdomain to another hostname
TXTProvider-specified nameProvider-specified textDomain ownership or service verification

The IP addresses above are documentation examples, not addresses to use for a real site. Copy the actual values from your hosting account.

Scenario 3: You are connecting a subdomain

For a subdomain such as app.example.com, add the record at the authoritative DNS provider using the host name app. Use an A or AAAA record for a server address, or a CNAME when the destination is another hostname. Then add the same hostname to the hosting platform’s custom-domain settings. A DNS record alone does not always configure the web server to serve the correct application.

Scenario 4: You are moving from one host to another

Reduce the DNS record TTL before a planned migration if your provider allows it, and make a backup of the current DNS zone. Prepare the new website, confirm its IP address or target hostname, test it using a temporary URL or local hosts-file override where suitable, and then change the relevant records. Keep the old hosting available until traffic is reaching the new service and the application has been checked. For a broader migration workflow, see the cloud server migration runbook.

What to double-check

Nameservers and authoritative DNS: Use a DNS lookup to confirm which nameservers are authoritative. If the lookup shows different nameservers from the ones you edited, you are probably changing the wrong DNS zone.

Root and www behavior: Test both https://example.com and https://www.example.com. Decide which version is canonical and configure a redirect or application-level behavior for the other. Do not assume that a working root domain automatically configures www.

DNS-only versus proxy settings: Some DNS platforms offer proxy or traffic-routing modes. Follow the hosting provider’s requirements, especially for origin IP addresses, TLS certificates, ports, and health checks.

SSL setup: Add the custom domain in the hosting panel before requesting or enabling its certificate when the platform requires domain validation. Test HTTPS after DNS points to the intended service, and check that redirects do not create a loop.

Email records: Website changes should not overwrite MX, SPF, DKIM, or DMARC records. If email is already in use, preserve its records and document any required changes. The email authentication guide covers a maintenance workflow for these records.

Verification commands: From a terminal, you can query records with commands such as:

dig example.com A
dig example.com AAAA
dig www.example.com CNAME
dig example.com NS
nslookup example.com

Compare the answers with the values supplied by your host. Check from a second network or resolver when possible. A DNS propagation check can show different results temporarily because resolvers cache records independently; a lookup result is evidence of what one resolver sees, not a guarantee that every user sees the same answer.

Common mistakes

  • Adding the full domain in the host field: Some panels expect www or @, while others expect a fully qualified name. Follow the panel’s format to avoid creating a duplicated name.
  • Using a CNAME at the root when the provider does not support it: Standard DNS has restrictions around CNAME records at the zone apex. Use the provider’s supported apex method, such as an A record or an approved alias feature.
  • Leaving an old A record in place: Conflicting records can send visitors to different servers. Review the complete record set rather than adding a new value blindly.
  • Changing nameservers without copying email records: The website may work while mail stops. Export or document the existing zone first.
  • Checking too soon and repeatedly changing values: Frequent edits make diagnosis harder. Record each change, allow caches time to expire, and verify systematically.
  • Forgetting the hosting-panel step: Many platforms require the domain to be added to the site, virtual host, load balancer, or application configuration as well as to DNS.
  • Testing only from one browser: Clear local cache where appropriate, test HTTP and HTTPS, inspect the certificate name, and use command-line DNS queries to separate DNS problems from application problems.

For a more detailed approach to caches, TTLs, and mismatched answers, use the DNS propagation troubleshooting guide.

When to revisit

Keep this checklist with your website launch notes and revisit it before each new deployment that changes hosting, DNS, TLS, or email. It is especially useful when you register a new domain, add a subdomain, move to a cloud VPS, replace a server, change DNS providers, or introduce a service that requires TXT verification.

Before seasonal planning cycles or other high-traffic periods, confirm that domain renewal details, DNS access, backups, and recovery contacts are current. Review the checklist whenever your registrar, hosting control panel, or DNS provider changes its workflow. Interface labels and validation steps can change even when the underlying DNS concepts remain the same.

For the next launch, complete these final actions:

  1. Write down the intended nameservers, IP addresses, hostnames, and TTL values.
  2. Back up or export the current DNS records.
  3. Make one controlled DNS change and record its timestamp.
  4. Verify authoritative nameservers and public A, AAAA, and CNAME responses.
  5. Test the root domain, www, subdomains, HTTPS, redirects, forms, and key application paths.
  6. Confirm that email records still resolve and that the hosting account recognizes the domain.
  7. Keep rollback details and the previous working configuration accessible.

Once the new site is serving correctly from the intended host, document the final configuration. That record turns the next domain connection, hosting move, or troubleshooting session into a repeatable operation rather than a guess.

Related Topics

#domains#web hosting#nameservers#DNS records#website launches
w

whata.cloud Editorial Team

Technical Editor

Senior editor and content strategist. Writing about technology, design, and the future of digital media. Follow along for deep dives into the industry's moving parts.