How to Connect a Domain to Web Hosting: DNS Records, Nameservers, and Troubleshooting Checklist
domain setupDNSweb hostingnameserversA recordsCNAME recordsSSLwebsite launch

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

ddummies.cloud Editorial Team
2026-08-03
7 min read

Learn how to connect a domain to shared hosting, a VPS, or a website builder using nameservers, DNS records, SSL checks, and a launch checklist.

Connecting a domain to web hosting is mainly a matter of telling the domain where your website lives. This reusable checklist explains nameservers, A records, CNAME records, DNS propagation, SSL, and the safest setup path for shared hosting, VPS platforms, website builders, and managed WordPress hosts.

Overview

Your domain registrar and hosting provider are often separate companies. The registrar manages the domain registration, while the host provides the server or website platform. DNS connects the two by translating a domain such as example.com into the destination a browser should contact.

There are two common ways to make that connection:

  • Change nameservers: You delegate DNS management to the hosting provider. The host supplies nameservers, and its control panel usually creates or manages the required records.
  • Edit DNS records: You keep DNS at the registrar or a separate DNS provider and add records such as an A record or CNAME record yourself.

Neither method is automatically better. Nameserver changes can be simpler when the host manages your entire setup. Direct record editing gives you more control and can be safer when the domain also handles email, verification records, subdomains, or other services. Before changing anything, record the existing DNS settings and identify whether email is already in use.

For a deeper explanation of the two main website records, see A Record vs CNAME: When to Use Each. If you are using Cloudflare as your DNS provider, the workflow is covered in How to Use Cloudflare With Your Domain.

Checklist by scenario

Before changing anything

  1. Confirm the exact domain and the host or website platform you are connecting it to.
  2. Open the host’s domain or setup instructions and find the required nameservers, IP address, target hostname, or verification record.
  3. Check whether the domain has active email. Do not replace nameservers or delete MX records without knowing how email is configured.
  4. Save a copy or screenshot of the current DNS zone, including A, AAAA, CNAME, MX, TXT, and any service-specific records.
  5. Make sure you can sign in to both the registrar and hosting account. Turn on account security features where available.

Shared hosting or managed WordPress hosting

Many shared and managed WordPress providers give you either nameservers or a server IP address. If you want the host to manage DNS, choose the nameserver route:

  1. Copy the host’s nameserver addresses exactly.
  2. At the registrar, open the domain’s nameserver settings.
  3. Replace the current nameservers with the supplied values, unless the host specifically instructs you to add rather than replace them.
  4. In the hosting panel, add the domain to the account and select the correct document root or site.
  5. Wait for the host to recognize the domain, then test both the root domain and the www version.

If you prefer to keep DNS at the registrar, use the host’s supplied IP address for an A record at the root domain. Add a CNAME for www if the host instructs you to point it to the root domain or another target. Do not guess the target: website platforms often require a specific hostname rather than an IP address.

VPS or self-managed server

A VPS usually requires more than a DNS change. First configure the web server, virtual host, application, firewall, and deployment path. Then:

  1. Find the VPS public IPv4 address and, if applicable, its IPv6 address.
  2. Create an A record for the root domain pointing to the IPv4 address.
  3. Create an AAAA record only when the server is correctly configured for IPv6.
  4. Create a CNAME for www if that matches your preferred site structure, or create a separate A record if required by your server setup.
  5. Configure the web server to respond to both intended hostnames and confirm that the application knows its public URL.

DNS cannot fix a server that is not listening for the domain, is blocked by a firewall, or has an incorrect virtual-host configuration. Test the server by IP where appropriate, but use the domain name for final application and SSL testing.

Website builder

Website builders commonly ask you to add one or more records and sometimes a verification TXT record. In the builder’s domain settings, enter the domain first, then copy each requested record into the DNS provider exactly as shown. Pay attention to whether the provider expects @, a blank host field, or the full domain in the name field. For a subdomain such as shop.example.com, use shop as the host when that is what the DNS provider expects. This is the usual way to point a domain to a website builder without moving all DNS management to the builder.

Email and other services

Website records and email records are separate. If your custom-domain email is already working, preserve its MX records and related TXT records while connecting the website. Adding a website A record does not normally replace MX records, but changing nameservers can remove access to the old DNS zone unless you recreate the needed records at the new provider. Review your email provider’s setup instructions before making a nameserver change.

What to double-check

  • Record type: Use an A record for an IPv4 address, an AAAA record for an IPv6 address, and a CNAME for a hostname. A CNAME should not be used where a provider requires an IP address.
  • Host or name field: The root domain may appear as @, a blank field, or the domain itself, depending on the DNS interface.
  • Trailing dots and full hostnames: Some systems display fully qualified names with a trailing dot; follow the provider’s format rather than adding duplicate domain text.
  • Conflicting records: Multiple A records can send traffic to different destinations. Old records, duplicate CNAMEs, or an unintended AAAA record can cause inconsistent results.
  • TTL and propagation: DNS resolvers cache answers for the record’s TTL. A DNS propagation checker can show what different resolvers currently return, but no checker can force every cached answer to update immediately.
  • SSL: After DNS points to the correct platform, enable HTTPS in the host or builder dashboard. Certificate issuance may require the domain to resolve correctly, and the certificate must cover every hostname you use, such as the root domain and www.
  • Canonical hostname: Decide whether visitors should use the root domain or www. Configure a redirect or canonical setting so both versions do not behave as separate sites.

For launch monitoring after the connection is complete, use the principles in Uptime Monitoring for Small Websites. A monitor can help distinguish a DNS problem from a later hosting outage.

Common mistakes

  • Changing nameservers without copying email records: This can interrupt mail delivery even when the website works. Export or document the old zone first.
  • Using the wrong IP address: Hosting accounts may show separate addresses for shared hosting, staging, databases, or other services. Use the address specifically assigned to the website.
  • Editing DNS in the wrong place: The active DNS provider is determined by the domain’s nameservers. Changes made at a registrar may have no effect if nameservers point to Cloudflare or another provider.
  • Expecting instant results: Test from more than one network or resolver, and allow time for cached records to expire. Avoid repeatedly changing records while waiting; that makes troubleshooting harder.
  • Forgetting the root and www versions: A site may work at one hostname and fail at the other. Configure both according to the host’s instructions.
  • Installing SSL too early: Certificate setup often fails when DNS still points to the old host or the domain has not been added to the hosting account.
  • Leaving the old host active: If both destinations serve different versions of the site, visitors may see inconsistent content during the transition. Put the old site in maintenance mode or keep it available only until the new setup is verified.

When to revisit

Revisit this checklist whenever you change hosting, move a domain to a new registrar, add a website builder, migrate WordPress, replace an email provider, or put Cloudflare or another DNS service in front of the site. It is also useful before a seasonal campaign or major launch, when a forgotten staging record, expired certificate, or incorrect redirect can become visible to more visitors.

Before making a planned change, lower complexity rather than changing several systems at once. Document the current records, identify the rollback path, and schedule the work when you can test the site and email. Afterward, confirm the following:

  1. The active nameservers are the ones you intended.
  2. The root domain and www resolve to the intended platform.
  3. Important subdomains still work.
  4. Email sending and receiving still work if email uses the domain.
  5. HTTPS loads without certificate warnings.
  6. Forms, logins, redirects, analytics, and third-party verification services function normally.
  7. The old hosting account is not receiving live traffic before you cancel it.

Keep the final DNS layout and hosting details in a secure operations note. That small record turns the next domain move or website migration into a controlled procedure instead of a memory test. For related planning, see the domain transfer guide and compare hosting plans with renewal costs in mind using our web hosting renewal pricing guide.

Related Topics

#domain setup#DNS#web hosting#nameservers#A records#CNAME records#SSL#website launch
d

dummies.cloud Editorial Team

Domains and Hosting Editors

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.