How to Connect a Domain to Web Hosting: DNS, SSL, and Email Setup Guide
DNSDomain ManagementWeb HostingSSLBusiness EmailWebsite Launch

How to Connect a Domain to Web Hosting: DNS, SSL, and Email Setup Guide

CCrazy Domains Editorial Team
2026-11-05
7 min read

A practical checklist for connecting a domain to shared, cloud, or VPS hosting while protecting DNS, email, SSL, and website access.

Connecting a domain to web hosting involves more than entering a server address. This guide provides a reusable checklist for shared hosting, cloud hosting, and VPS hosting, covering nameservers, DNS records, SSL, email protection, propagation checks, and final launch testing.

Overview

A domain and a hosting account are separate services. The domain is registered with a domain registrar, while the hosting account stores and serves your website files, database, and application. DNS connects the two by telling browsers which servers should handle requests for your domain.

There are two common ways to connect a domain to hosting:

  • Change nameservers: Point the domain to the nameservers supplied by your hosting provider. The hosting provider then manages the domain’s DNS zone.
  • Edit DNS records: Keep DNS management at the registrar or current DNS provider and add records such as an A record, CNAME record, MX records, and TXT records manually.

Nameserver changes can be simpler when the hosting provider offers a managed DNS setup. Individual DNS records provide more control and can be preferable when you already use separate services for email, security, analytics, or other subdomains. Before making changes, record the existing DNS settings and confirm which services currently depend on them. For a broader explanation of the choices, see Nameservers vs DNS Records.

Have these details ready before you start:

  • The exact domain name and hosting account you want to connect.
  • The hosting provider’s nameservers, server IP address, or destination hostname.
  • Any existing email, verification, subdomain, or third-party service records.
  • Access to the domain registrar, DNS provider, hosting control panel, and email platform.

Checklist by scenario

Scenario 1: Connecting a domain using nameservers

  1. Open the hosting control panel and find the domain connection or DNS instructions.
  2. Copy the provider’s nameserver addresses exactly. Avoid typing them from memory.
  3. At the domain registrar, replace the domain’s current nameservers with the supplied values.
  4. Save the change and note the date and time.
  5. Wait for the change to appear across DNS resolvers. Some locations may update before others.
  6. Return to the hosting panel and add the domain if the provider requires a separate domain setup step.
  7. Confirm that the website’s document root, application, or virtual host is associated with the correct domain.

Changing nameservers can also change where email and other DNS records are managed. If the new DNS zone does not contain the correct MX, TXT, CNAME, and other records, email or verification services may stop working. Export or copy the existing records before changing nameservers, then recreate the records in the new DNS zone as needed.

Scenario 2: Connecting a domain with DNS records

  1. Keep the domain’s current nameservers unchanged.
  2. Open the active DNS management interface. This may be at the registrar or a separate DNS provider.
  3. Add an A record for the root domain, such as example.com, pointing to the hosting server’s IPv4 address.
  4. Add an AAAA record only when the hosting provider supplies an IPv6 address and the server is configured to accept IPv6 traffic.
  5. Add a CNAME record for www if the host instructs you to point it to the root domain or a supplied hostname.
  6. Configure the preferred version of the domain, then set the other version to redirect to it through the hosting control panel or web server.
  7. Add any required verification, security, or service records supplied by your host or third-party platforms.

Do not create conflicting A, AAAA, or CNAME records for the same hostname. A CNAME generally should not share the same hostname with other record types. If your hosting provider gives different instructions, follow those instructions and verify the resulting records before launch.

Scenario 3: Adding a subdomain

For a subdomain such as shop.example.com or docs.example.com, create the record at the active DNS provider and configure the matching subdomain in the hosting platform. An A record can point to a server IP, while a CNAME can point to another hostname. The correct choice depends on the destination service. Test the subdomain separately rather than assuming the root domain configuration applies to it.

Scenario 4: Preserving business email

Website DNS and email DNS can coexist, but website changes must not overwrite email settings. Keep the existing MX records when moving a website unless you are intentionally migrating email. Preserve mail-related TXT records used for sender authentication and provider verification, as well as any required CNAME records. If email is hosted separately, confirm its records before and after the website connection.

Review DNS Records Explained if you need to identify the role of A, CNAME, MX, and TXT records.

Scenario 5: Activating SSL

  1. Confirm that the domain is correctly added to the hosting account.
  2. Wait until DNS resolves to the intended server, or follow the host’s supported validation method.
  3. Enable the hosting provider’s SSL certificate or install the certificate supplied by your security provider.
  4. Test both the root domain and the www hostname over HTTPS.
  5. Enable HTTP-to-HTTPS redirection only after HTTPS works correctly.
  6. Update application URLs, image links, scripts, and canonical settings if the site was previously configured for HTTP.

What to double-check

Use this verification pass before announcing the site:

  • DNS authority: Confirm which nameservers are authoritative. Editing records in an inactive DNS panel will have no effect.
  • Record values: Check the hostname, record type, destination, and trailing dot conventions where the provider specifies them.
  • TTL: A record’s time to live affects how long resolvers may cache the previous value. Lowering TTL before a planned migration can make testing and rollback easier, but cached results may still persist.
  • Propagation: Check the domain from more than one network or DNS lookup tool. Results can differ while caches expire.
  • Website response: Test the homepage, key pages, forms, login areas, redirects, images, and downloadable files.
  • Email delivery: Send and receive test messages using the affected domain. Confirm that MX and sender-authentication records remain present.
  • SSL coverage: Check the exact hostnames visitors use, including both the root domain and www where applicable. Look for certificate warnings and mixed content.
  • Application configuration: Update environment variables, allowed origins, callback URLs, webhooks, and CMS site URLs where relevant.
  • Backups and rollback: Keep a recent website and database backup, and save the previous DNS values until the migration is stable.

A DNS change does not transfer website files or databases. If the site is moving from one hosting provider to another, migrate the application first, test it on the new server, and change DNS only when the destination is ready. The website hosting maintenance checklist can help complete the related backup and security checks.

Common mistakes

  • Changing nameservers without copying email records: The website may work while business email stops receiving messages.
  • Pointing to the wrong IP address: Hosting dashboards may show several addresses for different services. Use the address specifically assigned to the website.
  • Editing the wrong DNS provider: First identify the authoritative nameservers, then make changes in the corresponding DNS zone.
  • Testing too soon: A successful result on one connection does not prove that every resolver has updated.
  • Forgetting the www hostname: Configure and test both common versions, including their redirects and SSL coverage.
  • Creating duplicate or conflicting records: Remove obsolete records when the hosting instructions require a single destination.
  • Enabling HTTPS before the certificate is ready: This can produce browser warnings or redirect loops.
  • Skipping the application layer: DNS can be correct while a CMS still uses the old URL, a firewall blocks the new server, or a VPS virtual host serves the wrong site.

When to revisit

Keep this checklist available whenever the underlying setup changes. Revisit it before moving between shared hosting, cloud hosting, and VPS hosting; before changing domain registrars or nameservers; before migrating business email; and before adding a new subdomain, application, or third-party service.

It is also useful before seasonal planning cycles or major campaigns, when downtime and email loss are especially disruptive. Review DNS, SSL expiry status, backups, redirects, and contact details as part of routine website maintenance. Tools and hosting workflows can change, so compare the current provider instructions with your saved notes rather than reusing old record values automatically.

For a final launch pass, confirm that you have: (1) identified the authoritative DNS provider, (2) saved the existing records, (3) connected the correct hosting destination, (4) protected email records, (5) activated and tested SSL, (6) checked propagation from multiple networks, and (7) retained a tested backup and rollback plan. This process makes connecting a domain to web hosting predictable, even when the infrastructure changes later.

Related Topics

#DNS#Domain Management#Web Hosting#SSL#Business Email#Website Launch
C

Crazy Domains Editorial Team

Web Infrastructure 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.