Pointing Your Domain to Web Hosting
4 min read
## Pointing Your Domain to Web Hosting
You have a domain name from one registrar and hosting from another. How do you connect them? The answer is DNS — specifically, either updating your nameservers to point to your host, or adding individual DNS records to your current nameservers.
This guide covers both approaches and specific instructions for popular hosting platforms.
## Two Approaches: Nameservers vs DNS Records
### Approach 1: Change Nameservers (Full DNS to Host)
Your hosting provider often offers their own nameservers. Pointing your domain's NS records at them means *all* DNS management moves to the host's control panel.
**Pros:** Simple. The host auto-configures most records for you.
**Cons:** You lose fine-grained control and cannot use a separate DNS provider (like Cloudflare) without extra steps.
Best for: shared hosting beginners who want everything managed in one place.
### Approach 2: Add DNS Records to Existing Nameservers
Keep your current nameservers (registrar or Cloudflare) and manually add the records your host requires — usually an A Record pointing to the host's IP, plus a CNAME Record for `www`.
**Pros:** Full control. Works with Cloudflare and any DNS provider.
**Cons:** More manual steps; you need to find the host's IP or CNAME target.
Best for: developers who want to manage DNS separately, or who use Cloudflare for CDN/security.
## Shared Hosting (cPanel, Plesk)
Most shared hosting providers give you a server IP address. You need:
```
@ A 203.0.113.10 3600
www A 203.0.113.10 3600
```
Or with a CNAME for `www`:
```
@ A 203.0.113.10 3600
www CNAME example.com. 3600
```
Log into your host's cPanel or account page, find "Hosting Info" or "Server Details," and copy the IP address. Then add these records via your registrar's or DNS provider's control panel.
## WordPress Managed Hosting
Managed WordPress hosts (WP Engine, Kinsta, Flywheel, SiteGround) often use a CNAME Record for both the root and `www` via CNAME flattening, or they provide a specific IP for the A record.
**WP Engine example:**
```
@ A 35.190.80.1 3600
www CNAME yoursite.wpengine.com. 3600
```
**Kinsta example:**
```
@ A 104.18.x.x 3600
www CNAME yoursite.kinsta.cloud. 3600
```
Always check your specific host's documentation — IPs and CNAME targets vary by plan and region.
## Vercel
Vercel uses a CNAME for subdomains and a proprietary A record at the root:
```
@ A 76.76.21.21 3600
www CNAME cname.vercel-dns.com. 3600
```
Add your domain in the Vercel dashboard (Project > Settings > Domains) and it will show you exactly which records to create. Vercel also supports automatic SSL provisioning once DNS is verified.
## Netlify
Netlify offers two DNS connection methods:
**Method 1 — Netlify DNS (recommended):** Change nameservers to Netlify's (`dns1.p01.nsone.net` etc.). Netlify auto-configures everything.
**Method 2 — External DNS:** Add records manually:
```
@ A 75.2.60.5 3600
www CNAME yoursite.netlify.app. 3600
```
The root A record (`75.2.60.5`) is Netlify's Netlify Load Balancer IP — verify this is current in their docs, as it can change.
## GitHub Pages
GitHub Pages hosts sites at `username.github.io` or `org.github.io`. To point a custom domain:
```
@ A 185.199.108.153 3600
@ A 185.199.109.153 3600
@ A 185.199.110.153 3600
@ A 185.199.111.153 3600
www CNAME username.github.io. 3600
```
GitHub provides four A record IPs for redundancy. Add all four. Then configure the custom domain in your repository's Settings > Pages.
## Amazon Web Services (AWS)
For AWS, common scenarios include:
**EC2 instance with Elastic IP:**
```
@ A [Elastic IP] 3600
www CNAME example.com. 3600
```
**CloudFront distribution:**
```
www CNAME d1234.cloudfront.net. 3600
```
For the root domain with CloudFront, use Route 53's Alias record (a proprietary record type that resolves like a CNAME at the apex) or add your CloudFront distribution as an A record target in Route 53.
## VPS / Dedicated Servers
For any server where you control the IP:
1. Log into your server provider and find the IP address of your instance
2. Add an A record pointing your domain to that IP
3. If the server has IPv6, add an AAAA Record too
```
@ A 203.0.113.10 3600
@ AAAA 2001:db8::1 3600
www A 203.0.113.10 3600
www AAAA 2001:db8::1 3600
```
## After Adding Records
DNS changes can take minutes to hours to propagate depending on TTL values and DNS Propagation. To verify:
```bash
dig example.com A
dig www.example.com A
```
Or use the DNS Record Helper tool to check from multiple global locations simultaneously.
Your hosting provider may require additional verification steps — adding a verification TXT record or confirming the domain in their dashboard — before SSL certificates are issued.
## Troubleshooting
**Website still shows old host:** Wait for DNS Propagation to complete. Check TTL on the old record — if it was set to 86400, you may wait up to 24 hours.
**www works but root does not (or vice versa):** Make sure both `@` and `www` have records. Many setups accidentally configure only one.
**SSL certificate errors after pointing domain:** Most hosts auto-provision SSL via Let's Encrypt once DNS verification passes. This can take 10–30 minutes after DNS propagates.
For detailed troubleshooting, see DNS Troubleshooting Guide. For migration from one host to another, see DNS During Domain Migration.