CompareHostingOnline

Home / Guides / How to point a domain to your hosting

Guide

How to point a domain to your hosting

Two ways to connect a domain you bought elsewhere to your hosting, step by step, with checks for www, SSL, email and common errors.

By Muhammad Hamza, Founder & EditorUpdated Nov 30, 2026
A93.184.216.34AAAA2606:2800:…MX10 mail.example.comNSns1.example.netTXTv=spf1 -all

Short answer

Either change the domain's nameservers to your host's, or keep your current DNS and set an A record for the domain to the server IP your host gives you, plus a record for www. The first is simpler; the second keeps your DNS where it is and leaves email untouched.

Last verified Nov 28, 2026 · How we test
At a glance
  • What does pointing a domain mean?A new hosting account answers on a temporary address or an IP address.
  • Option 1: change the nameserversThis is the easiest route because the host creates the records for you.
  • Option 2: edit the A record and keep your DNSLeave the nameservers alone.

What does pointing a domain mean?

A new hosting account answers on a temporary address or an IP address. Pointing your domain tells the internet that example.com belongs to that server. You do that with DNS, and you have two ways to do it. Which is right depends on where you want DNS to live and what else uses your domain, especially email.

Option 1: change the nameservers

This is the easiest route because the host creates the records for you. The cost is that all DNS now lives at the host. If you use email at another provider, add its MX and TXT records in the host’s DNS panel before you switch, or mail will stop.

  1. Find your host's nameservers

    They are in the welcome email or the account area, usually two or more names.

  2. Enter them at the registrar

    Replace the current nameservers in the domain settings.

  3. Add the domain to the hosting account

    Create the site in the panel so the server knows to answer for that name.

  4. Wait, then test

    DNS can take from minutes to a day or two to settle everywhere.

Option 2: edit the A record and keep your DNS

Leave the nameservers alone. In your current DNS panel, set an A record for the bare domain to the IP address your host gave you, and an A record or CNAME for www. Your email records stay exactly as they are. This is the better choice if your email, your CDN or another service already depends on the domain’s DNS.

If your host serves the site over IPv6 as well, also add an AAAA record. Do not add an AAAA record you cannot verify, because visitors on IPv6 networks would be sent to a server that does not answer.

RecordNameValuePurpose
A@ (the bare domain)Your host’s IP addressMakes example.com reach the server
CNAME or Awwwexample.com or the same IPMakes www.example.com work
MX and TXT@Leave unchangedKeeps email working

Which option should you choose?

  • One site, one host, simple email: change nameservers.
  • Email at another provider, or a CDN in front of the site: edit the A record.
  • You plan to move hosts often: keep DNS at the registrar or a DNS provider and only edit records.
  • Not sure what depends on your DNS: copy all records first and choose option 2.

What should you check after the change?

  • Open both example.com and www.example.com. Choose one as the main address and redirect the other to it.
  • Install or renew the SSL certificate once the name resolves to the new server. Certificate authorities check the name before they issue a certificate.
  • Test email: send and receive a message in both directions.
  • Look up the records with an external tool to confirm what resolvers see.
  • Keep the old hosting account until you are sure everything works.

Why does my domain still show the old site or an error?

Almost always it is caching. Your computer, your router and your internet provider’s resolver may keep the old address until the TTL ends. Try a private window, another network such as mobile data, or a public lookup tool.

If it is still wrong after a day, check three things: that the A record has the right IP address, that the domain was added in the hosting panel, and that the nameservers you set are the ones the registrar actually shows. A domain parked at a registrar can also keep showing the registrar’s own placeholder page until DNS changes.

How do you point a subdomain or an extra domain?

To use a subdomain such as shop.example.com on a different server, add an A record (or a CNAME if the service gives you a hostname) for that subdomain only. The main domain stays where it is. This is the easiest way to host a store, a help centre or an app on another platform without moving your main site. Our guide to subdomain vs subfolder explains when each choice makes sense.

To add a second domain to an existing hosting account, add it as an add-on or parked domain in the control panel, then point its DNS the same way as the first. Each domain needs its own certificate and its own email records.

How do you keep email working while you move the site?

Email is the part people forget. If the domain’s MX records stay unchanged, mail keeps flowing to its current provider, whatever you do with the website. That is why editing only the A record is safe. If you change nameservers, copy all MX and TXT records first. Our guide to moving email to a new host covers the full process, and email hosting vs web hosting explains why many people keep the two separate.

What if you only want to test before going live?

Before you change DNS, you can preview the new site. Most hosts provide a temporary URL or let you edit your local hosts file so your own computer sees the new server while everyone else still sees the old one. Test pages, forms, logins and checkout. Then change DNS. This avoids the common case of switching first and discovering a broken page afterwards. The website migration checklist has a full pre-launch list.

What if your host asks you to verify the domain?

Some hosts and services ask you to add a TXT record or a CNAME to prove you control the domain before they enable a certificate or a feature. Add exactly the record they give you, with the exact name and value, then use a DNS lookup to confirm it is visible. A verification record does not change where your site points, so it is safe to add at any time. Keep it in place; some services re-check it later.

Sources and further reading

Common questions

How do I point my domain to my hosting?

Either set your domain's nameservers to the ones your host gives you, or keep your current DNS and set an A record for the bare domain to your host's IP address, plus a record for www. The first is simpler, the second keeps email untouched.

How long until my domain shows my new site?

Usually within a few hours, sometimes up to a day or two, because DNS answers are cached. Test from another network or a private window, and use a lookup tool to see what resolvers return rather than relying on your own computer.

Why does only www or only the bare domain work?

They are separate names with separate records. Add an A record for the bare domain and an A record or CNAME for www, then choose one as the main address and redirect the other to it so visitors and search engines see one version.

Will pointing my domain affect my email?

Editing the A record does not touch email, because email uses MX records. Changing nameservers does, unless you copy the MX and TXT records first. Test sending and receiving after any DNS change.

Do I need to move my domain to my host?

No. A domain can stay at its registrar and point to any host. Keeping them separate makes later changes easier, because you can move the site without moving the name.

Related

More guides

Esc

Use the arrow keys, then Enter.