How to Point a Domain to Hosting: A Records-by-Records Setup Guide
domainsDNSnameserversA recordsweb hosting

How to Point a Domain to Hosting: A Records-by-Records Setup Guide

HHost-Server.cloud Editorial Team
2026-12-06
7 min read

Learn how to point a domain to hosting with nameservers, A records, CNAMEs, TTLs, redirects, testing, and rollback checks.

Connecting a domain to a new hosting account is usually a DNS change, but the safest setup depends on whether you control DNS at the registrar, need to preserve email, or are moving only the website. This records-by-records checklist explains when to change nameservers, when to edit individual records, how to handle the root domain and www, how to test propagation, and how to roll back without guessing.

Overview

Your domain registration and web hosting do not have to be with the same company. The registrar holds the registration, while DNS tells browsers and other services where to find your website, email, and subdomains. To connect the domain to hosting, you normally choose one of two approaches:

  • Change nameservers: Delegate DNS management to the hosting provider. The provider then supplies the DNS zone and records used by the domain.
  • Change individual records: Keep DNS at the current provider and update only the records needed for the website, commonly an A record and a www CNAME.

Before changing anything, record the current DNS configuration. Pay particular attention to MX records for email, TXT records used for verification or email security, existing subdomains, and any records supporting a CDN or third-party service. A screenshot is useful, but an exported zone file or written record list is better.

SituationUsually the better approachWhy
New website and no important DNS servicesChange nameservers or individual recordsEither method can work; choose the simpler control panel.
Email is managed separatelyChange individual website recordsThis reduces the risk of replacing or overlooking email records.
DNS is managed by a CDN or security providerKeep the existing nameservers and edit records thereThe CDN or security layer must remain authoritative for DNS.
Moving the entire DNS zone to a hostChange nameservers after copying required recordsThe host becomes responsible for the domain's DNS records.

Nameserver changes are broader than a website change. They can affect email, verification records, subdomains, and other services. If you only need to connect a CMS such as WordPress to new web hosting, individual records are often the more controlled option when DNS already supports other services.

Checklist by scenario

Scenario 1: Change nameservers to the hosting provider

  1. Open the hosting account and locate its authoritative nameserver pair. Use the exact values shown in that account; do not substitute examples from another provider.
  2. Review the current DNS zone and copy important records before making the change. Include MX, TXT, CNAME, and subdomain records, not only the website record.
  3. At the registrar, replace the existing nameservers with the hosting provider's nameservers. Save the change without altering unrelated registration settings.
  4. In the hosting control panel, add the domain to the correct website, document root, or CMS installation. A nameserver change alone does not always create the website configuration.
  5. Confirm that the new DNS zone contains the intended root-domain record, www record, mail records, and verification records.

Use this method when you want the hosting provider to manage the complete DNS zone and you have confirmed that no external service will be lost. If the domain supports business email, verify the MX records before considering the change complete.

Scenario 2: Point the root domain with an A record

  1. Find the hosting account's public IPv4 address. Confirm that it is the address assigned to the intended site, not a shared panel address or temporary preview address.
  2. At the current DNS provider, create or update an A record for the apex or root name. Depending on the interface, the name may be shown as @, blank, or the domain itself.
  3. Enter the hosting IPv4 address as the value. Use the provider's recommended TTL, or choose a short TTL before a planned migration if the interface allows it.
  4. Remove conflicting A records only when you are certain they belong to the old website. Multiple A records can be intentional, so investigate before deleting them.

An A record maps a hostname to an IPv4 address. If the provider supplies an IPv6 address, add an AAAA record for the same hostname only when the server is correctly configured to accept IPv6 traffic. Do not add an AAAA record simply because one is available; an incomplete IPv6 setup can create inconsistent results for visitors.

Scenario 3: Handle www with a CNAME

  1. Create or update a CNAME record for www.
  2. Point it to the hostname supplied by the hosting platform, such as a platform-specific target, rather than guessing an IP address.
  3. Make sure the hosting account recognizes both the root domain and www as valid site names.
  4. Choose one canonical version and configure an HTTP redirect from the other version. The redirect should be configured by the web server, hosting platform, or CMS—not by adding a second DNS record.

A CNAME is a DNS alias, not a web redirect. DNS makes a hostname resolve; the hosting layer decides whether requests are served, redirected, or rejected. Test both https://example.com and https://www.example.com after HTTPS is configured.

Scenario 4: Add a subdomain

For a subdomain such as app.example.com, create the record at the authoritative DNS provider. Use an A or AAAA record when the subdomain points directly to an address, or a CNAME when the hosting platform gives you a hostname target. Then add the subdomain to the relevant application, virtual host, CMS network, or deployment configuration. DNS and the application must both recognize the name.

Scenario 5: Keep email with another provider

Point only the web records if email is hosted elsewhere. Do not replace MX records with values from the web host unless the host is also intended to receive mail. Preserve relevant TXT records, including service verification and email authentication records, and confirm mail delivery after the website change.

What to double-check

  • Authoritative DNS: Make changes at the provider listed by the domain's active nameservers. Editing DNS at the registrar will have no effect if another service is authoritative.
  • DNS record names: Interfaces differ. Some expect @, while others expect an empty host field or a fully qualified domain name. Follow the field labels and avoid duplicating the domain name if the interface appends it automatically.
  • TTL values: TTL controls how long resolvers may cache a record. A lower TTL can make planned changes easier to test, but it does not force every resolver to refresh immediately. After the change is stable, use the provider's normal recommended value.
  • CMS configuration: Update the site URL, trusted domains, application environment variables, and canonical URL if the domain or protocol changed. For WordPress, check that the configured home and site URLs match the intended HTTPS hostname.
  • SSL coverage: Confirm that the certificate covers every hostname visitors will use. DNS pointing correctly does not automatically mean HTTPS is ready. See the SSL certificate renewal checklist for related HTTPS checks.
  • Propagation testing: Query the root domain, www, and important subdomains from more than one network or DNS lookup tool. Compare the returned records with the values you intended to publish.
  • Application response: A successful DNS lookup is only one step. Check the HTTP status, redirect destination, certificate warning status, homepage, login page, forms, assets, and CMS administrator access.

During a migration, keep the old hosting account available until DNS results are consistent and the new site has passed functional checks. A documented rollback is safer than trying to reconstruct the previous records under pressure. If troubleshooting spans both DNS and mail, use a dedicated DNS troubleshooting reference.

Common mistakes

  • Changing nameservers without copying the zone: The website may work while email, verification, or subdomains fail because the new provider does not have the old records.
  • Using the wrong IP address: Hosting dashboards may show several addresses. Confirm which one serves the specific domain.
  • Creating a CNAME at the root when the provider does not support it: The apex has special DNS behavior. Use the host's documented method, which may involve an A record, an alias feature, or nameservers.
  • Expecting DNS to create a redirect: Pointing www to the root domain does not redirect a browser. Configure the redirect at the hosting or application layer.
  • Deleting mail records during a website move: Website DNS and email DNS can coexist. Change only the records required for the migration.
  • Testing only one hostname: Check both root and www, HTTP and HTTPS, and any application subdomains. A partial setup can look correct from one URL.
  • Making several changes at once: Record the time and purpose of each change. Small, reversible steps make propagation and error diagnosis easier.

When to revisit

Use this checklist whenever you launch a CMS site, migrate to cloud hosting or VPS hosting, add a subdomain, change a CDN, separate email from web hosting, or move domain registration. Revisit it before seasonal planning cycles and whenever a hosting control panel, DNS provider, deployment workflow, or certificate process changes.

For a practical final pass, save the following with the project or operations documentation:

  1. The registrar and authoritative DNS provider.
  2. The intended A, AAAA, CNAME, MX, and important TXT records.
  3. The canonical hostname and redirect behavior.
  4. The hosting account, site root, and CMS domain configuration.
  5. The date of the change, observed DNS results, and rollback values.

After the site is stable, review uptime, backups, and resource behavior rather than treating the DNS task as the end of the migration. The website uptime and performance review template can help turn the one-time connection into a repeatable website operations check.

Related Topics

#domains#DNS#nameservers#A records#web hosting
H

Host-Server.cloud Editorial Team

Technical SEO 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.