For our Blog Visitor only Get Additional 3 Month Free + 10% OFF on TriAnnual Plan YSBLOG10
Grab the Deal

How to Connect a Domain and Hosting When Bought Separately

To connect a domain and hosting bought separately, get the hosting provider’s nameservers or server IP and update DNS at your domain registrar. Either switch nameservers to the host’s nameservers or keep your registrar’s DNS and point A/CNAME records to the hosting. Allow DNS propagation, install SSL, and verify the change.

Connecting a domain to hosting when they’re purchased separately is simple once you understand DNS. In this guide, I’ll show you exactly how to connect a domain to hosting using two proven methods changing nameservers or pointing DNS records—plus real-world tips, verification steps, and WordPress-specific checks. Use whichever approach fits your setup best.

What You’re Connecting: Domain, DNS, Nameservers, Hosting

Before you start, clarify the moving parts. This avoids mistakes and downtime.

Domain Registrar

The company where you bought your domain (e.g., Namecheap, GoDaddy, Google Domains transfers, BigRock). You control nameservers and DNS records here unless you delegate DNS to your host.

DNS and Nameservers

Nameservers tell the internet where to find your DNS records. DNS records map your domain to IPs and services (A, AAAA, CNAME, MX, TXT, etc.). You can either use your host’s nameservers or keep DNS at the registrar (or a third-party like Cloudflare).

Web Hosting

Your server where website files live. You’ll need either the server’s shared IP (for A records) or the host’s nameservers. Hosting control panels (cPanel, Plesk, DirectAdmin, or a custom panel) expose these details.

Two Ways to Connect a Domain to Hosting

Best when you want the hosting provider to manage all DNS records automatically. Great for beginners and typical WordPress sites.

Steps:

  • Locate your hosting nameservers (e.g., ns1.host.com, ns2.host.com). In YouStable, you’ll find them in your welcome email and client portal.
  • Log in to your domain registrar and open DNS/Nameserver settings.
  • Select “Custom nameservers” and enter the two or more nameservers from your host.
  • Save changes and wait for DNS propagation (usually minutes to a few hours, up to 24–48 hours globally).
  • In your hosting panel, add the domain to the account (as primary or addon domain) so it points to your website files.

Pros:

  • Fastest for non-technical users.
  • Host auto-creates most DNS records (A, www CNAME, MX if using host email).
  • Easier SSL integration and WordPress installs.

Cons:

  • If you use third-party email (Google Workspace, Microsoft 365), you must ensure MX/TXT records are kept or reapplied in the host’s DNS.
  • DNS management lives with your host (migrate carefully if you change hosts later).

Method 2: Keep Registrar DNS and Point A/CNAME Records

Best when you prefer control at your registrar or use external DNS (e.g., Cloudflare) and already have email records set up.

Steps:

  • Find your hosting account’s IPv4 address (and IPv6 if available). In YouStable, the server IP is shown in your panel and welcome email.
  • At your registrar’s DNS manager, edit/add these records:
    • A record for @ pointing to your server IP (root domain).
    • CNAME for www pointing to your root domain (or another A to the same IP).
    • Optional AAAA record if your host provides an IPv6 address.
  • Do not change nameservers; save DNS changes and wait for propagation.
  • In the hosting panel, add the domain to the account so it serves your site.

Pros:

  • Keep DNS where it already lives; easy to maintain third-party email.
  • Fine-grained control for multiple services (CDN, subdomains, SaaS verifications).

Cons:

  • More manual; you must create and maintain records.
  • If your server IP changes, you must update A/AAAA records.

DNS Record Examples You Can Copy

Replace example.com with your domain and 203.0.113.10 with your server IP.

; Root domain to hosting server
@      3600  IN  A      203.0.113.10

; www to root (preferred)
www    3600  IN  CNAME  example.com.

; Optional IPv6
@      3600  IN  AAAA   2001:db8:abcd::10

; If you use Google Workspace email (keep these when switching DNS)
@      3600  IN  MX     1 ASPMX.L.GOOGLE.COM.
@      3600  IN  MX     5 ALT1.ASPMX.L.GOOGLE.COM.
@      3600  IN  TXT    "v=spf1 include:_spf.google.com ~all"

; For Let’s Encrypt/SSL verifications, temporary TXT records may be added by the host

Preparation Checklist (Avoid Downtime)

  • Confirm where DNS is managed (registrar, host, or Cloudflare).
  • Back up current DNS records (export zone file or screenshot).
  • Get host details: nameservers and/or server IP, SSL options, and document root.
  • Lower TTL to 300–600 seconds a few hours before changes for faster propagation (if your DNS provider allows it).
  • If you use custom email (Google/Microsoft), preserve MX, SPF, DKIM, and DMARC records.

Step-by-Step: Change Nameservers

  • Copy your host’s nameservers (e.g., ns1.youstable.com, ns2.youstable.com).
  • Sign in to your registrar and open Nameservers settings.
  • Select “Custom” and paste the nameservers. Save.
  • In your hosting panel, add the domain and install a free SSL (Let’s Encrypt).
  • Wait for propagation, then verify with DNS lookup tools.

Step-by-Step: Point DNS Records (A/CNAME)

  • Copy your hosting server’s IP address.
  • Create/update an A record for @ to that IP, and a CNAME for www to @.
  • Add AAAA if your host supports IPv6.
  • Leave existing MX/SPF/DKIM/DMARC records untouched if email is external.
  • Add domain to hosting, install SSL, and test.

Verify and Troubleshoot DNS Propagation

DNS usually updates within an hour, but global propagation can take up to 48 hours. Check from multiple locations to be sure it’s complete.

# Check which nameservers are active
dig NS example.com +short

# Check A record resolution
dig A example.com +short
dig A www.example.com +short

# Windows alternative
nslookup -type=ns example.com
nslookup example.com

# Clear local DNS cache (macOS)
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  • If results show the old IP, wait or clear caches and recheck.
  • Mismatch between www and root? Ensure both records exist and align.
  • SSL error? Issue a new certificate after DNS resolves to your host.
  • Site loads but assets break? Fix WordPress Address and Site Address (Settings → General) and enforce HTTPS.

WordPress-Specific Checks After Connecting

  • Update WordPress Address (URL) and Site Address (URL) if needed.
  • Install and auto-renew an SSL certificate; force HTTPS via .htaccess or your host’s tool.
  • Set preferred domain (www or non-www) and add a 301 redirect to avoid duplicate content.
  • Regenerate permalinks (Settings → Permalinks → Save).
  • Update CDN settings (if used) to point to the new domain or host.
# Example .htaccess HTTPS redirect (Apache)
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Email Considerations When Switching DNS

  • If you change nameservers to your host, re-create MX, SPF, DKIM, and DMARC records there for third-party email (Google/Microsoft).
  • If you only change A/CNAME at your registrar, your existing email records remain intact.
  • Test email send/receive after propagation. Use DNS lookup to verify MX and SPF.

Using Cloudflare or a CDN

If you use Cloudflare, keep Cloudflare nameservers at the registrar and update the A/CNAME in Cloudflare’s DNS to point to your new host’s IP. For proxied records (orange cloud), SSL mode should typically be “Full” when the origin has a valid certificate.

Common Mistakes to Avoid

  • Forgetting to add the domain inside your hosting panel—no site will load.
  • Pointing only the root domain but not www (or vice versa).
  • Breaking email by changing nameservers without re-adding MX/SPF/DKIM.
  • Not allowing time for DNS propagation before testing.
  • Skipping SSL issuance—modern browsers flag “Not Secure.”

When to Transfer the Domain to Your Host

Transferring the domain is optional. Consider it if you prefer a single bill, one support team, and easier DNS management. It doesn’t improve SEO or speed by itself. If you’re happy with your registrar tools, you can leave the domain where it is and just update DNS.

Why Many Beginners Prefer YouStable

  • Clear nameserver and IP details in your welcome email and panel.
  • One-click SSL, domain auto-detection, and DNS templates reduce errors.
  • 24×7 support to help you choose between nameservers vs. A-record pointing based on your email/CDN setup.
  • Free site migration on most plans ensures a clean cutover with minimal downtime.

Quick Decision Guide: Which Method Should You Use?

  • Choose “Change Nameservers” if you want the host to manage everything automatically and you don’t rely on complex third-party DNS integrations.
  • Choose “Point A/CNAME Records” if you already have email/CDN/SaaS DNS at your registrar or Cloudflare and want to keep granular control.

FAQs

How long does DNS propagation take after I update nameservers or A records?

Most changes resolve within 15–60 minutes regionally, but full global propagation can take up to 24–48 hours. Lowering TTL to 300–600 seconds beforehand can speed early updates. Use dig, nslookup, or tools like whatsmydns to monitor progress.

Which is better: changing nameservers or pointing A records?

For simplicity, change nameservers to your host. For control and existing third-party services (email/CDN), keep your registrar’s or Cloudflare DNS and point A/CNAME records. Both work equally well for performance and SEO when configured correctly.

Will changing nameservers break my email?

It can, if you don’t re-create MX/SPF/DKIM/DMARC records at the new DNS provider. Before switching nameservers, copy your current email records. After the switch, add them to the host’s DNS zone. If you only change A/CNAME at your registrar, email remains unaffected.

How do I connect a domain to WordPress hosting specifically?

Add the domain to your WordPress hosting panel, then either change nameservers or point A/CNAME to the server IP. After propagation, issue a free SSL and set WordPress Address and Site Address. Force HTTPS and update permalinks. Most managed hosts (including YouStable) automate these steps.

Can I use Cloudflare while hosting my site with another provider?

Yes. Keep Cloudflare nameservers at your registrar and update Cloudflare’s DNS to point to your host’s IP. Use “Full” SSL mode with a valid origin certificate. This gives you CDN, DDoS protection, and fast global DNS without changing your hosting provider.

Conlusion

Connecting a domain and hosting bought separately boils down to a clean DNS plan and careful verification. Choose the method that fits your workflow, preserve email records, install SSL, and verify with DNS tools. If you want a guided setup with 24×7 help, YouStable’s team can connect your domain to hosting in minutes.

Deepika Verma

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top