How to Connect a Domain to Your Hosting (Nameservers or A Record)
Connect a domain to your hosting step by step, either by changing nameservers or by editing the A record, then check that the website, www and email all work.

Table of Contents
- Which method should you use?
- Method 1: Change nameservers
- Method 2: Change the A record
- Step 3: Add the domain to your hosting
- Step 4: Check that it works
- Step 5: Enable HTTPS
- Step 6: Check email
- Worked example: domain at one company, hosting at another
- A quick pre-flight checklist
- Troubleshooting
- Frequently Asked Questions
- Related reading
- Sources
There are two ways to connect a domain to hosting: change the domain's nameservers to your hosting provider's (the host then manages all DNS), or keep your current DNS and change the A record (plus www) to your hosting server's IP address. Use nameservers when the host should manage everything; use the A record when you want to keep DNS elsewhere, for example because email or other services are hosted somewhere else.
Before you start, have your hosting welcome email ready: it lists the nameservers and the server IP address.
Which method should you use?
| Situation | Method |
|---|---|
| New domain, website and email on the same host | Change nameservers |
| Email hosted elsewhere (separate email service) | Change A record only |
| DNS managed in Cloudflare or another DNS service | Change A record in that service |
| Many custom records you want to keep | Change A record only |
The difference is explained in nameservers vs DNS records.
Method 1: Change nameservers
- Find your host's nameservers, for example
ns1.examplehost.comandns2.examplehost.com, in the welcome email or client area. - Note your existing DNS records if the domain was already in use (especially MX and TXT records for email). Changing nameservers replaces the whole DNS zone.
- Log in to your domain registrar and open the domain's management page.
- Find Nameservers (sometimes "DNS management" or "Change nameservers"), choose custom nameservers, and enter the host's nameservers.
- Save the change.
- Wait for propagation: often a few hours, sometimes up to 24–48 hours. See DNS propagation explained.
If the domain is registered with ServerNeed, you can manage nameservers from the domain page in My Account.
Method 2: Change the A record
- Find your hosting server's IP address in the welcome email or control panel.
- Log in to wherever your DNS is managed (registrar, Cloudflare or another DNS host).
- Edit the A record for the root domain (
@) so it points to the hosting IP. If one already exists, change its value rather than adding a second one. - Set up
www: either an A record forwwwwith the same IP, or a CNAME fromwwwto your root domain. - Leave MX and TXT records alone unless your email is moving too.
- Save and wait for the TTL to expire.
If you are using Cloudflare, see how to set up Cloudflare DNS for the proxy settings.
Step 3: Add the domain to your hosting
The hosting account must know about the domain:
- For the main domain of a cPanel account, this is set when the account is created.
- For an additional domain, add it in cPanel → Domains and choose its document root folder.
Step 4: Check that it works
- Visit the domain and
wwwversion in a private browser window. - Use an online DNS checker to see whether resolvers worldwide return the new IP.
- From a terminal:
nslookup example.comordig example.com A. - If you still see the old site, your computer may be using a cached answer; try another network or flush your DNS cache.
Step 5: Enable HTTPS
Once the domain points to the hosting, issue an SSL certificate (often automatic) and redirect HTTP to HTTPS. See how to install a free SSL certificate in cPanel.
Step 6: Check email
If email is hosted with the same provider, check the MX records point to it and send test messages both ways. If email is elsewhere, confirm its MX records were not changed. See MX records explained.
Worked example: domain at one company, hosting at another
A business registered example.com at Registrar A, uses a separate business email service, and has just bought web hosting at Host B.
Because email lives elsewhere, they choose Method 2 (A record) and keep DNS at Registrar A:
- Host B's welcome email gives the server IP:
203.0.113.10. - In Registrar A's DNS panel, they change the
@A record from the registrar's parking IP to203.0.113.10. - They set
wwwas a CNAME toexample.com. - They leave the email service's MX, SPF and DKIM records exactly as they are.
- In Host B's cPanel, the domain is already the main domain of the account.
- After about 30 minutes,
dig example.com A +shortreturns203.0.113.10, the site loads, and they run AutoSSL. - Email continues to work throughout, because nothing about it changed.
Had they changed the nameservers to Host B instead, they would first have needed to recreate the email records in Host B's DNS zone.
A quick pre-flight checklist
- I know where my domain's DNS is currently hosted (check the nameservers)
- I have a copy of all existing DNS records
- I know my hosting server's IP or nameservers
- The domain is added to my hosting account
- I know where my email is hosted and will keep its records intact
Troubleshooting
| Problem | Likely cause |
|---|---|
| Old site still showing | DNS cache; wait for TTL or test from another network |
| "Domain not configured" page from the host | Domain not added to the hosting account |
| www works but root does not (or the reverse) | Missing A or CNAME record for one of them |
| Email stopped after changing nameservers | MX/TXT records not recreated at the new DNS host |
| Changes at the registrar have no effect | Domain uses different nameservers, so edit records there instead |
Frequently Asked Questions
How long does it take for a domain to point to new hosting?
Record changes usually take effect within the record's TTL (often minutes to an hour); nameserver changes can take several hours to a day or two to be seen everywhere.
Do I need to transfer my domain to my host?
No. Pointing works with the domain at any registrar. Transferring only changes who you renew with.
Related reading
For background, see what is DNS. Register a domain with the ServerNeed domain search, or contact support if your domain still does not resolve.
Sources
Last updated 7 October 2026



