Contents
Every domain involves three roles that may sit in different places: the registrar you bought it from, the DNS provider that holds its records, and the host that stores the site’s files. Connecting a domain to hosting means telling DNS the new server’s address, either by moving all DNS management to the host or by editing one record at your current provider.
Before you start
- A login to your domain registrar.
- An active hosting account, and the server’s IP address if you choose the A record method.
- Knowing where your email currently lives, so it doesn’t break during the switch.
- An active domain that hasn’t expired.
Pick a method
| Change nameservers | Point an A record | |
|---|---|---|
| What you change | Nameservers at the registrar | The A record at your current DNS provider |
| Who manages records | The host | Your current provider, e.g. Cloudflare |
| Email records | Created at the host | You add them yourself |
| Best when | You want the simplest route | You want to keep DNS where it is |
Method 1: change the nameservers
1. Open the nameserver settings at your registrar
Sign in at the registrar, open the domain, and look for a section called Nameservers, DNS or Custom DNS, then choose custom nameservers instead of the registrar’s defaults. If you can’t find it, check the registrar’s official help pages.
2. Enter the host’s nameservers
Remove all the old nameservers and enter:
ns1.arabicode.com
ns2.arabicode.com
Type them exactly as shown, with no http:// and no trailing dot, then save. Some country-code registries check that the nameservers already know the domain before accepting the change, so add the domain to the hosting account first (step 6). More detail in the change nameservers guide.
3. Verify the change
dig NS example.com +short
# or on Windows:
nslookup -type=ns example.com
The new nameservers should appear. If you still see the old ones, the change didn’t save or is still propagating.
Method 2: point an A record
4. Find the server’s IP address
Open cPanel, look at General Information in the sidebar and copy the Shared IP Address.
5. Edit the records at your DNS provider
| Type | Name | Value |
|---|---|---|
| A | @ |
The server’s IP address |
| CNAME | www |
example.com |
- Delete any old A or AAAA record for the same name; a stale AAAA record sends IPv6 visitors to the old site.
- If your email is on the hosting, copy the MX, SPF and DKIM records shown in cPanel under Email » Email Deliverability.
- In Cloudflare, keep the record DNS only until the first SSL certificate is issued, as in using Cloudflare with your hosting.
After connecting (both methods)
6. Add the domain to the hosting account
The primary domain is added when the account is created. To add another, open Domains » Domains » Create A New Domain, enter the domain, untick Share document root so it gets its own folder, then click Submit. Upload the site’s files into that folder.
7. Wait for propagation and track it
The change reaches networks gradually according to the TTL, anywhere from minutes up to 48 hours. Follow it with the DNS lookup tool, and if only your own device shows the old version, flush your local DNS cache:
# Windows
ipconfig /flushdns
# macOS
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
In Chrome, open chrome://net-internals/#dns and click Clear host cache. For why it takes time, read DNS propagation explained.
8. Check the SSL certificate
Once the domain points to the server, open Security » SSL/TLS Status. If the certificate isn’t issued yet, click Run AutoSSL.
Troubleshooting
- The old site still shows after 48 hours: recheck the nameservers at the registrar for typos and confirm they saved; see nameservers not updating.
- The domain stops resolving entirely (
SERVFAIL): if DNSSEC is on at the registrar with old DS records, turn it off before changing nameservers. Details in fixing SERVFAIL. - The domain points to the server but shows a default page: the domain isn’t added to the hosting account, or the files aren’t in its folder.
- Email stopped after changing nameservers: your external mail provider’s MX records weren’t carried over. Add them in Zone Editor.
wwwworks but the bare domain doesn’t, or the reverse: one of the two records is missing.- SSL warning after connecting: wait for the certificate, and pause the Cloudflare proxy if you use it.
For the full list of causes, see domain not pointing to hosting.
On ArabyHost
The simplest route is changing the nameservers to ns1.arabicode.com and ns2.arabicode.com: the essential records (A, MX, SPF, DKIM) are created automatically, and you can edit them later in the control panel’s DNS editor. A free SSL certificate is issued through AutoSSL once the domain points to the server. Generic extensions such as .com, .net, .org, .io and .store can be registered straight from the panel; Arab country extensions such as .sa, .eg and .ae are registered with the accredited registrar and then pointed to ArabyHost’s nameservers. If you’re moving an existing site, ask for free migration help before you change the nameservers so the site and email stay up.
FAQ
Which is better: changing nameservers or an A record?
Changing nameservers is simpler because the host creates the website and email records itself. Use an A record if you want to keep DNS at another provider such as Cloudflare; you then add the email records yourself.
Will my email stop when I change nameservers?
It can, if your email is with another provider, because the old MX records don't move over automatically. Copy your mail records before the switch and add them to the new DNS zone.
Why do some people see the new site and others the old one?
Propagation is gradual, and each network keeps the old answer until its TTL expires. The difference usually disappears within 24 to 48 hours.