How to connect your domain to your website (any host)
By Domain Yoga · Last updated July 27, 2026
You connect a domain to a website by pointing the domain’s DNS at your host — and there are exactly two ways to do that. Either you change the domain’s nameservers so the host (or a DNS provider) takes over your DNS entirely, or you keep DNS where it is and add the one or two specific records the host asks for. Every host — Vercel, Netlify, Shopify, anything else — is a variation on those two moves; the dashboards differ, the pattern doesn’t. This guide covers both methods, the one confusing part (why your bare domain can’t use a CNAME), and the flow on three real hosts. (If nameserver, A record, or TTL are fuzzy, our domain glossary defines them all in one place. And if you registered the domain five minutes ago, this pairs with our first-hour checklist.)
What are the two ways to connect a domain?
Method one: change your nameservers. At your registrar, you replace the default nameservers with the ones your host gives you. From that moment the host is authoritative for the entire zone — every DNS question about your domain, not just the website. The upside is simplicity — one dashboard for everything — and some conveniences require it (Vercel only supports wildcard domains this way, for instance). The downside is the blast radius. Most host nameservers start from a fresh zone, so any record they don’t know about stops existing — most painfully your MX records. If you have email running on your domain, re-add those records at the new provider before the switch, or your mail silently breaks. And note: changing nameservers moves your DNS, not your domain — transferring a domain to another registrar is a different process.
Method two: keep your DNS, add records. You leave DNS wherever it lives today — usually your registrar’s dashboard — and add only what the host asks for: typically an A or ALIAS record on the bare domain, a CNAME on www, and occasionally a TXT record to prove ownership. Everything else — email included — is untouched. If the domain is brand new and empty, either method works; if it already carries anything, add records and leave the nameservers alone.
Why can’t the apex domain use a CNAME?
Here’s the wrinkle every host’s setup screen is quietly working around. A CNAME record says “this name is an alias for that name” — and the DNS spec says a CNAME shouldn’t share a name with other records, a rule resolvers enforce in practice. But your apex (the bare example.com, no www) is the root of the zone: it must carry the zone’s SOA and NS records, and usually MX and TXT records too. So a plain CNAME can’t live at the apex.
There are two standard fixes. The first is an A record — instead of aliasing a hostname, you point the apex directly at the host’s IP address. The second is a provider-side feature called ALIAS, ANAME, or CNAME flattening: you enter what looks like a CNAME, and your DNS provider resolves the target behind the scenes and serves ordinary A (and AAAA) answers — compliant, but still tracking the host’s addresses (Cloudflare flattens automatically at the apex on every plan).
Meanwhile www is just a subdomain, so a normal CNAME is fine — which is why nearly every setup guide has the same shape: A or ALIAS on the apex, CNAME on www.
How do I do it on a real host?
One rule before the walkthroughs: never copy DNS values from a blog post — including this one. The IPs and hostnames hosts use change over time, and on some platforms they’re unique to your project. Only the value on your own setup screen counts.
Vercel. Open your project, go to Settings → Domains, click Add Domain, and enter your domain (adding the apex prompts you to add www too). Vercel then offers three options: an A record for the apex, a CNAME for subdomains, or its nameservers. The A-record IP is assigned per project from a pool, and the CNAME target is project-unique — so copy exactly what the Domains page shows you, character for character.
Netlify. From your site, go to Domain management → Add domain → Add a domain you already own, enter it, click Verify, then Add domain. Netlify makes you pick one of two lanes — Netlify DNS (nameservers) or external DNS (records) — and warns you not to mix them. On external DNS, www gets a CNAME pointing at your site’s own something.netlify.app address, and the apex gets an ALIAS/ANAME/flattened CNAME (with a plain A record as the documented fallback if your DNS provider can’t flatten). The Pending DNS verification link in the dashboard reveals the exact values for your site — click it even if you’ve read the docs, because some plan tiers get different targets than the generic ones.
Shopify. In the admin, go to Settings → Domains → Connect existing domain, enter the domain, and click Next. If your domain sits at Cloudflare, GoDaddy, or IONOS — the registrars Shopify’s own docs list for automatic connection — Shopify can update the DNS for you. Otherwise you do it manually: an A record (plus an AAAA record) on the apex and a CNAME on www, using the values from Shopify’s connect screen and help page. Two Shopify-specific notes: your nameservers must stay at the registrar’s defaults for the manual method to work, and Shopify quotes up to 48 hours before the connection is fully live.
Three dashboards, one pattern: tell the host your domain, then create the records it shows you — or hand it your nameservers.
What about HTTPS — do I need to buy a certificate?
No. Vercel, Netlify, and Shopify all provision a free Let’s Encrypt-backed certificate automatically once DNS resolves to them, and renew it automatically. Nothing to buy, upload, or configure for a standard setup. A certificate warning right after DNS goes live usually means issuance is still in flight — give it a few minutes, occasionally longer.
One sharp edge: on .dev and .app domains, browsers force HTTPS, so until the certificate exists the site won’t load at all — no warning to click past, just nothing. If that’s you, our .dev and .app guide explains what to expect.
How do I know it worked?
Trust two signals. The first is the host’s own dashboard — the authoritative one: Vercel flags a domain as Invalid Configuration until the records are right, Netlify shows Pending DNS verification, and Shopify flags problems in Settings → Domains. When the status clears, you’re done. The second is a propagation checker like whatsmydns.net or dnschecker.org (Vercel’s own troubleshooting docs recommend DNSChecker and dig), which shows what resolvers around the world currently answer.
Expect a delay and don’t fight it. Plain record changes usually settle in minutes; nameserver changes can take 24–48 hours. A pro move from Vercel’s docs: lower the record’s TTL to around 60 seconds well ahead of a migration, so caches pick up the shorter TTL and mistakes roll back fast. If it’s been well past 48 hours and checkers still agree on the wrong answer, you’re no longer waiting on propagation — something is misconfigured, and our DNS propagation guide has the calm checklist for finding it.
Connecting a domain is the easy part — the hard part is owning a name worth connecting. If you’re still at that stage, Domain Yoga generates around 250 availability-checked, brandability-ranked domain ideas in seconds, so you can register one and be back on this page in minutes.