Domains
How to point your domain to your hosting, step by step
For your domain to show your website, it has to point to your hosting. We show you both ways to do it, changing nameservers or editing the A record, when each one makes sense, how to check propagation and what to do if something goes wrong.

HostSpace team
6 min read
Key takeaways
- Changing nameservers moves your whole DNS zone, including email, to your hosting.
- Editing the A record changes only the website and leaves other records untouched.
- Propagation can take minutes up to 48 hours, depending on TTL and the type of change.
- If your email is on another service, keep or copy your MX records.
Article contents
How a domain connects to your hosting
Registering a domain and buying hosting are two different things. The domain is the name (yourbusiness.com) and the hosting is the server where your site lives. For your site to load when someone types the name, the domain has to be told which server to go to. That is done through DNS, the directory that translates names into IP addresses. To understand it in depth, read what is DNS.
You have two ways to do it:
- Option A: change the nameservers. You hand control of all your DNS to your hosting.
- Option B: edit the records. You keep DNS where it is and only change where the website points.
Before you start, have your hosting welcome email at hand: it includes the nameservers and your server's IP address.
Option A: change the nameservers
This is the simplest path and the one we recommend if your website and email will live on the same hosting. When you change nameservers, your whole DNS zone is managed from your hosting: website, subdomains and email.
- Log in to the company where you registered your domain (your registrar).
- Find the section called Nameservers or DNS servers.
- Choose the option to use custom nameservers.
- Replace the current ones with your hosting's. They look like
ns1.yourprovider.comandns2.yourprovider.com. Enter at least two, exactly as they appear in your welcome email. - Save the changes and wait for propagation (we explain how long it takes below).
Option B: keep your DNS and edit the A record
Use this option if your email is with another provider, if you manage DNS on an external service, or if you only want to move the website without touching anything else.
- Log in to wherever your DNS is managed today (registrar or external service).
- Open your domain's DNS zone or DNS records.
- Edit the A record for the root domain (shown as
@or as the bare domain) and enter your hosting IP, for example203.0.113.25. - For
www, create or edit a CNAME record pointing toyourbusiness.com. You can also use another A record with the same IP. - Delete any other A or AAAA records for
@orwwwthat point to an old server; if two remain, some visitors will see the old site. - Leave the MX records alone if your email lives elsewhere.
When you're done, the website records should look like this:
yourbusiness.com. 3600 IN A 203.0.113.25
www.yourbusiness.com. 3600 IN CNAME yourbusiness.com.Nameservers or A record: which to choose
| Aspect | A: nameservers | B: A record |
|---|---|---|
| Where DNS is managed | At your hosting | Where it already was (registrar or other) |
| What you change | The nameservers at the registrar | The A record and the www CNAME |
| Moves to the hosting too | Stays put as long as you leave MX alone | |
| Difficulty | Very low | Low, but values must be copied carefully |
| Best for | Website and email with the same provider | Email on another service or custom DNS rules |
In short: if everything will be with the same provider, change the nameservers. If your email or DNS is already on another service and working well, edit only the A record.
DNS propagation and how to check it
DNS changes are not visible everywhere instantly. Each record has a TTL (time to live) that tells servers and devices how many seconds they may cache it. Until that cache expires, some visitors will keep reaching the old server.
- An A record change usually shows up within minutes or a few hours, depending on TTL.
- A nameserver change can take up to 24 to 48 hours.
Tip: if you plan the move, lower the record's TTL to 300 seconds a day ahead. When you change the IP, the update spreads much faster.
To check where your domain points, use the terminal:
dig +short yourbusiness.com A
dig +short www.yourbusiness.com
dig +short NS yourbusiness.com
nslookup yourbusiness.com 8.8.8.8dig ships with macOS and Linux; on Windows use nslookup. If the answer shows your hosting IP, it's pointing correctly. You can also use web-based DNS propagation checkers such as whatsmydns.net, which query from servers in several countries and show where the change is already visible.
Common errors
- The site still doesn't load after hours. Use
digto confirm the IP is correct and that you saved the changes at your registrar. A one-letter typo in a nameserver is enough to break it. - Sometimes you see the new site, sometimes the old one. A duplicate A record or an AAAA (IPv6) record still points to the old server. Delete it.
- yourbusiness.com works but www doesn't. The CNAME or A record for
wwwis missing. - Email stopped arriving. You changed nameservers without copying the MX records (and the SPF and DKIM ones) to the new zone. Add them; we cover the latter in SPF, DKIM and DMARC explained.
- “Not secure” warning. The certificate is issued once the domain points to the server. After propagation, follow our guide to install free SSL on cPanel.
- Your computer still shows the old site. It may be your browser or system cache. Try a private window or your phone on mobile data.
Frequently asked questions
An A record change usually shows up within minutes or a few hours, depending on its TTL. A nameserver change can take up to 24 to 48 hours.
Only if you don’t copy your MX records to the new DNS zone. If your email is on another service, create them at your hosting before switching, or edit only the A record.
If your website and email are with the same provider, change the nameservers. If your email or DNS is on another service, edit only the A record.
Run dig or nslookup with your domain and check that it returns your hosting IP, or use a web-based DNS propagation checker.

HostSpace team
We provide hosting, domains, VPS servers and business email with Spanish-speaking support. We write about what our customers ask us most.