# 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.

Source: https://comparehostingonline.com/guides/point-domain-to-hosting/

## 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](https://comparehostingonline.com/methodology/)

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 nameservers** This is the easiest route because the host creates the records for you.
-   **Option 2: edit the A record and keep your DNS** Leave 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.  1
    
    **Find your host's nameservers**
    
    They are in the welcome email or the account area, usually two or more names.
    
2.  2
    
    **Enter them at the registrar**
    
    Replace the current nameservers in the domain settings.
    
3.  3
    
    **Add the domain to the hosting account**
    
    Create the site in the panel so the server knows to answer for that name.
    
4.  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](http://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.

| Record | Name | Value | Purpose |
| --- | --- | --- | --- |
| A | @ (the bare domain) | Your host’s IP address | Makes example.com reach the server |
| CNAME or A | www | example.com or the same IP | Makes [www.example.com](http://www.example.com) work |
| MX and TXT | @ | Leave unchanged | Keeps 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](http://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](https://comparehostingonline.com/guides/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](https://comparehostingonline.com/guides/move-email-to-new-host/) covers the full process, and [email hosting vs web hosting](https://comparehostingonline.com/guides/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](https://comparehostingonline.com/guides/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](https://comparehostingonline.com/tools/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

-   [MDN: DNS glossary entry](https://developer.mozilla.org/en-US/docs/Glossary/DNS)
-   [Let’s Encrypt: Getting started](https://letsencrypt.org/getting-started/)
-   [Cloudflare DNS documentation](https://developers.cloudflare.com/dns/)
-   [RFC 1035: Domain names, implementation and specification](https://www.rfc-editor.org/rfc/rfc1035)

## 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

[What is DNS?](https://comparehostingonline.com/guides/what-is-dns/) [Nameservers explained](https://comparehostingonline.com/guides/nameservers-explained/) [What are DNS records?](https://comparehostingonline.com/guides/what-are-dns-records/) [DNS lookup tool](https://comparehostingonline.com/tools/dns-lookup/)

## More guides

[What is an SSL certificate? How HTTPS works and what to check](https://comparehostingonline.com/guides/what-is-an-ssl-certificate/) [How to choose web hosting: a step-by-step guide](https://comparehostingonline.com/guides/how-to-choose-web-hosting/) [How much does web hosting cost? Prices by type and what changes them](https://comparehostingonline.com/guides/how-much-does-web-hosting-cost/) [CDN service explained: what it does, free options and how to choose one](https://comparehostingonline.com/guides/what-is-a-cdn/) [Website backups: what to back up, how often and how to test a restore](https://comparehostingonline.com/guides/website-backups-guide/) [What is TTFB (time to first byte)? What is a good value and how to improve it](https://comparehostingonline.com/guides/what-is-time-to-first-byte/)

MH

**[Muhammad Hamza](https://comparehostingonline.com/team/muhammad-hamza/)** Founder & Editor

Writes and signs off every comparison, and runs the compliance reviews. Has worked on SOC 2 and HIPAA compliance programs for companies.

Our [editorial policy](https://comparehostingonline.com/editorial-policy/) and [testing method](https://comparehostingonline.com/methodology/) are public.
