Connect your domain purchased on namecheap to netlify
If you’re using Namecheap, and want to connect it to your deployed website on netlify you cannot use the ALIAS/ANAME method for the apex domain (root domain) because Namecheap doesn’t support those record types. Instead, you’ll use the A record fallback for your apex domain and a CNAME for the www subdomain.
Here’s exactly how to set it up in Namecheap:
Step 1: Configure DNS Records in Namecheap
- Log in to your Namecheap account
- Go to Domain List → Click Manage next to
exmple.com - Go to the Advanced DNS tab
- Delete any existing A records for
@or CNAME records forwww(especially if pointing to parking pages) - Add these records:
| Type | Host | Value | TTL |
|---|---|---|---|
| A Record | @ | 75.2.60.5 | Automatic |
| CNAME Record | www | apex-loadbalancer.netlify.com | Automatic |
Important:
- The
@symbol represents your apex domain (exmple.com) - Do not add
https://or trailing slashes in the Value fields
- Click Save All Changes
Step 2: Add Domain to Netlify
- In your Netlify dashboard, go to Site settings → Domain management → Custom domains
- Click Add custom domain
- Add
exmple.com(apex) - Add
www.exmple.com(www) - Wait for DNS propagation (usually 15-60 minutes, can take up to 24 hours)
Step 3: Set www as Primary (Recommended)
Netlify warned you that using the apex domain limits CDN benefits. To fix this:
- In Netlify’s Domain management, set
www.exmple.comas your primary domain - Set
exmple.comto redirect towww.exmple.com- Netlify usually offers a toggle to “Redirect apex to www” or you can configure this in your
_redirectsfile ornetlify.toml
- Netlify usually offers a toggle to “Redirect apex to www” or you can configure this in your
Step 4: Enable HTTPS
- Once DNS propagates (check status in Netlify dashboard), go to HTTPS section
- Click Verify DNS configuration
- Netlify will automatically provision an SSL certificate via Let’s Encrypt for both domains
Verification
You can check if it’s working by running:
dig exmple.com +short
# Should return: 75.2.60.5
dig www.exmple.com +short
# Should return: apex-loadbalancer.netlify.com
Note: If you were previously using Namecheap’s “URL Redirect” feature, make sure that’s disabled, as it conflicts with proper DNS records.
The changes typically take effect within 30 minutes, but allow up to 24 hours for full global propagation.