How to Connect Your Domain to a Website Host
You bought a domain at one company and built the site at another. Connecting them takes two or three DNS records, and the platform tells you which. What it does not tell you is which old records to remove, what happens to your email, or why the certificate is still pending an hour later. This guide covers both halves.
Two ways to connect
Every platform offers at least one of these:
- Add records where your DNS already is — at the registrar or at Cloudflare. You keep control of everything else in the zone, including email. This is the usual choice.
- Switch the domain's nameservers to the platform (Vercel, Netlify, Wix and others offer their own DNS). The platform then manages all records for you — and everything that was in the old zone, including MX and TXT records for email, must be recreated there first.
The records most platforms ask for
The root domain (example.com, the apex) gets A records with fixed addresses, because a CNAME is not allowed there — or an ALIAS / CNAME flattening record if your DNS provider supports it. www gets a CNAME to a name the platform controls.
| Platform | Apex (`@`) | `www` |
|---|---|---|
| Vercel | A 76.76.21.21 | CNAME cname.vercel-dns.com |
| Netlify | A 75.2.60.5 | CNAME <site>.netlify.app |
| GitHub Pages | A 185.199.108.153 … 185.199.111.153 | CNAME <user>.github.io |
| Cloudflare Pages | CNAME <project>.pages.dev | CNAME <project>.pages.dev |
| Shopify | A 23.227.38.65 | CNAME shops.myshopify.com |
| Squarespace | A 198.185.159.144 … 198.49.23.145 | CNAME ext-cust.squarespace.com |
Step by step
@ and www. Leave MX, SPF, DKIM and DMARC alone — deleting "everything old" is the most common way a website move takes email down with it.When the old site keeps showing
- A leftover AAAA record. Visitors with IPv6 — most mobile networks — follow it to the old host, while you on IPv4 see the new site.
- Registrar forwarding or parking. Some registrars apply a "web forwarding" or parking service on top of your records; switch it off.
- A CAA record that lists only another certificate authority blocks the platform's certificate. Add the CA it uses (often
letsencrypt.org), or see CAA records. - Cloudflare's proxy (the orange cloud) in front of Vercel or Netlify can block certificate issuance. Set those records to "DNS only" unless the platform's guide says otherwise.
- Caches. Your own computer and resolver can hold the old answer until the old TTL runs out; flushing the DNS cache clears the part you control.
Check before and after
These four lookups show almost every problem above:
dig +short example.com A
dig +short example.com AAAA # an old address here sends IPv6 visitors elsewhere
dig +short www.example.com CNAME
dig +short example.com CAA # if present, it must allow the platform's CAFrequently asked questions
Should I use an A record or a CNAME?
A records (or ALIAS) at the apex, a CNAME for www and other subdomains. A vs CNAME vs ALIAS explains why.
How long does it take to work?
Usually minutes after you save the records. If you replaced old records, up to their old TTL; the HTTPS certificate follows once the platform sees the new records.
Will I lose email if I connect my domain to a website builder?
Not if you only change the records for @ and www. If you switch nameservers to the platform, recreate your MX and email TXT records there before switching.
Should my site use www or not?
Either works. Pick one as the main address and redirect the other, so every link and search result points to the same place.
See the theory in practice — run a DNS Lookup for your own domain.