How Do I Connect My Domain Name to My Website?
Step-by-step guide to connecting a domain to your website using nameservers or DNS records, plus how to avoid breaking your email in the process.

Short answer: You connect a domain by telling it where your website lives, either by changing a couple of DNS records (usually an A record for the root domain and a CNAME for www) or by pointing the domain's nameservers to your host. Changing individual records is safer because it leaves your email alone. Expect it to take effect within minutes to a few hours.
Understand the three pieces first
Every connection problem we see comes from mixing up three things:
- Your domain registrar is where you bought the name and pay the renewal.
- Your DNS is the set of records that says where things live. It is managed by whoever runs your nameservers, often the registrar.
- Your web host or builder is where the site files actually sit.
Connecting a domain means editing DNS so that requests for your domain reach your host. That is all. Nothing moves, and you do not need to transfer the domain to your web host. If DNS is new to you, our explainer on what DNS is covers the basics in plain English.
The two methods, compared
| Method 1: Change records | Method 2: Change nameservers | |
|---|---|---|
| What you do | Edit the A and CNAME records at your current DNS host | Replace the nameservers at your registrar with your host's |
| Effect on email | None, email records stay put | Email breaks unless you recreate MX, SPF and DKIM at the new host |
| Speed | Often minutes, depending on TTL | Can take longer, occasionally up to a day or two |
| Who controls DNS afterwards | Stays where it was | Your web host |
| Best for | Most small businesses, especially with existing email | Brand new domains with no email, or moving to a CDN-based DNS deliberately |
Our rule of thumb: if you already have working email on the domain, change records, not nameservers.
Step by step: connecting with DNS records
- Get the target values from your host. Your website platform will show something like "Point an A record to 192.0.2.1 and a CNAME for www to yoursite.hostname.com." Copy these exactly.
- Find where your DNS is managed. Use a free nameserver lookup on your domain. If the nameservers belong to your registrar, edit DNS there. If they belong to someone else, such as Cloudflare or an old host, edit there.
- Screenshot the existing records. All of them. This is your undo button.
- Edit the root record. The root is often written as
@. Replace the existing A record value with your host's, or remove conflicting old A records. Some hosts give you a CNAME or ALIAS for the root instead, which only some DNS providers support, so follow your host's instructions. - Edit the www record. Usually a CNAME pointing to the host's address. Remove any conflicting A record for www.
- Leave MX, TXT and everything email-related alone.
- Verify in your host's dashboard. Most platforms have a "check connection" button.
- Turn on HTTPS. Most hosts issue a free SSL certificate automatically once the domain resolves. This may take a short while after connection.
- Pick your main version. Decide between
www.yourbusiness.comoryourbusiness.comand make sure the other one redirects to it.
Platform notes
- Wix, Squarespace, Shopify: each has a "connect a domain you own" wizard. Some offer to log in to your registrar and do it automatically. Convenient, but check afterwards that email records survived.
- WordPress hosting: usually an A record to the server's IP address.
- Static hosts and CDNs: typically a CNAME for www and a flattened CNAME or A records for the root.
Prefer someone else to do the fiddly bit?
We connect your domain, set up SSL and keep your email running for every client, at no extra cost. Take a look at our plans.
A worked example
Take a personal trainer in Auckland. She bought her domain from a big registrar years ago and uses it for email through Google Workspace. She has built a new site and her host tells her to "update your nameservers to ns1 and ns2 at our company".
Instead, she logs in to her registrar's DNS panel. She takes screenshots of everything: one A record for the root pointing at a parked page, a CNAME for www, five MX records for Google, an SPF TXT record, a DKIM TXT record and a Google verification TXT record. She asks her host for record-based instructions instead. They give her an IP address for the root and a target for www.
She changes just those two records. The parked page is replaced by her site within about twenty minutes. Her email does not even blink. The host's SSL certificate is issued shortly after. Total time: half an hour, most of it reading. Had she switched nameservers as first suggested, her Google Workspace records would have vanished from the new zone, and her clients' emails would have bounced.
Troubleshooting common problems
- "Site works without www but not with it" (or the reverse). You have connected one and forgotten the other. Add the missing record and set a redirect.
- Old site still showing. DNS caching. Check with an online DNS propagation checker. If it shows the new address in most places, be patient or clear your own device's DNS cache.
- "Not secure" warning. The SSL certificate has not been issued yet, or a conflicting record is blocking it. Our post on why a site says not secure walks through the fixes.
- Too many redirects. Usually an SSL setting mismatch between a CDN and the host, or two redirect rules fighting.
- Host verification failing. Look for leftover A or AAAA records from an old host. An old AAAA (IPv6) record is a classic hidden culprit.
Mistakes to avoid
- Switching nameservers when you have email. The single biggest cause of "my email stopped working".
- Leaving old records in place. Two A records for the root, one old and one new, means visitors randomly hit either.
- Not owning the registrar account. If a former designer holds the login, recover it before you need it. See who owns your website and domain.
- Forgetting the redirect between www and non-www. Search engines may see two copies of your site.
- Panicking after ten minutes. Give it a few hours before assuming it has failed.
How to check it worked
Once you have made the changes, run through these checks rather than just glancing at your homepage once:
- Visit all four versions:
http://yourbusiness.com,http://www.yourbusiness.com, and the same with https. All four should end up at your chosen main version, with a padlock. - Use a DNS propagation checker to see the new address showing in most locations around the world.
- Try a different network, such as mobile data instead of your office Wi-Fi, which may have the old answer cached.
- Send and receive an email from your domain address to confirm nothing changed on the email side.
- Submit your contact form and confirm the message arrives.
- Update Google Search Console if your preferred version changed, and check your Google Business Profile links to the right URL.
If all six pass, you are done. Make a note of what you changed and when, because the next person to touch your DNS, possibly you in two years' time, will thank you.
Our take
Connecting a domain is one of those jobs that looks scary and is mostly simple, as long as you respect one principle: change only what you need to. We see far too many guides, and even some hosts, telling owners to switch nameservers by default, because it is easier for the host. It is not easier for you if your email disappears.
If you are comfortable in your registrar's dashboard, you can absolutely do this yourself using the steps above. Take screenshots, change two records, wait, check. If you would rather not touch DNS at all, we do the whole thing for SiteDrum clients, including SSL and checking your email records survive, and we will happily explain what we did so you understand your own setup. You can always get in touch if you are stuck.
Quick checklist
- Know your registrar and who runs your DNS
- Screenshot every existing record
- Prefer changing A and CNAME records over nameservers
- Remove conflicting old A and AAAA records
- Leave MX and email TXT records untouched
- Confirm SSL, then redirect www and non-www to one version
- Send yourself a test email afterwards
The bottom line
Connecting your domain is a matter of pointing a couple of records at your host. Do it surgically, keep a record of what was there before, and your new website will go live without taking your email down with it.
Frequently asked questions
How long does it take for a domain to connect to a website?
Record changes often work within minutes to a few hours, depending on the previous TTL setting. Nameserver changes can take longer, occasionally up to a day or two. Check progress with an online DNS propagation checker.
Do I need to transfer my domain to my web host?
No. You can keep the domain at any registrar and simply point its DNS records at your host. Transferring is optional and mainly useful if you want everything under one account.
Will connecting my domain affect my email?
Not if you only change the A and CNAME records for the website. Email depends on MX and TXT records, which you should leave alone. Problems usually come from switching nameservers without recreating the email records.
Should my website use www or not?
Either works for SEO. Pick one as the main version and make sure the other redirects to it with a 301. Consistency matters more than the choice itself.
Why does my site show a security warning after connecting the domain?
The host usually issues a free SSL certificate once it can see the domain pointing correctly, which can take a little time. If the warning persists, check for leftover old records, especially AAAA records, that may be blocking certificate issuance.
Want a website that brings you customers?
Tell us what you do on WhatsApp and we will send a fixed quote and a free mockup.
Get my free mockupRelated guides
Our products
Website design near you
Website design in LondonWebsite design in New YorkWebsite design in TorontoWebsite design in BristolWebsite design in DubaiWebsite design in EdinburghWebsite design in PhoenixWebsite design in DublinWebsite design in AntwerpWebsite design in MiamiAll cities →
SiteDrum home · All guides · Sitemap · Contact us
More tech guides
- Do I Need an SSL Certificate for My Website?
- How Do I Get a Business Email Address With My Domain?
- Why Is My Website So Slow? Common Causes and Fixes
- Do I Need a Privacy Policy on My Website?
- How Do I Check If My Website Is Mobile Friendly?
- How Do I Redesign My Website Without Losing SEO?
- How Do I Protect My Website From Hackers?
- What Is a CMS and Do I Need One for My Website?