You have bought hosting, your cPanel account is ready, and the welcome email lists two nameservers such as ns1.yourhost.com and ns2.yourhost.com. The last step is to tell your domain registrar to use them. This guide shows exactly how to update nameservers at the three registrars our readers ask about most: GoDaddy, Namecheap and Cloudflare.
We also cover what to do before you switch so your email does not go down, how to check that the change has worked, and how to fix the most common problems.
What nameservers do (in one minute)
Nameservers are the “address book” for your domain. When someone types yourdomain.com, their browser asks the domain’s nameservers where the website and email live. Whoever runs your nameservers controls all of your DNS records: the A record for the website, the MX records for email, the TXT records for SPF and verification, and so on.
When you change nameservers to your hosting company’s, you are handing the whole DNS zone over to your cPanel server. From then on you manage records in cPanel’s Zone Editor, not at the registrar. If you only want to point the website and keep DNS where it is, you can change an A record instead. We compare both approaches in Nameservers vs A Records.
| Term | What it means |
|---|---|
| Registrar | The company you bought the domain from (GoDaddy, Namecheap, Cloudflare, etc.) |
| Nameservers (NS) | The servers that answer DNS questions for your domain |
| DNS zone | The full list of records (A, CNAME, MX, TXT) for your domain |
| Propagation | The time it takes for the change to be seen across the internet |
Before you change anything: a 5-minute checklist
Changing nameservers moves your whole DNS zone. Records do not copy across automatically, so a little preparation saves a lot of trouble.
- Get the exact nameservers from your host. Copy them from the welcome email or your hosting client area. A single typo will take your site offline.
- Write down (or screenshot) your current nameservers. If anything goes wrong you can switch back in minutes.
- Export or note your existing DNS records. Pay special attention to MX records (email), TXT records (SPF, DKIM, Google or Microsoft verification) and any CNAME records for services like Zoho Mail, Google Workspace or Microsoft 365.
- Make sure the domain exists in cPanel. It should be the primary domain of the account or added under Domains, so the server has a DNS zone ready to answer.
- Turn off DNSSEC at the registrar if it is enabled. If DNSSEC is on and the new nameservers don’t have matching keys, your domain can stop resolving completely.
- Avoid busy hours. Make the change at a quiet time for your visitors, such as late evening IST.
Tip: If you use Google Workspace, Zoho Mail or Microsoft 365 for email, re-create their MX and TXT records in cPanel’s Zone Editor right after the switch. Otherwise incoming mail will start arriving at your cPanel server instead.
How to change nameservers at GoDaddy
GoDaddy is the registrar many Indian website owners start with. Its dashboard layout changes from time to time, but the path below matches the current Domain Portfolio.
- Sign in to your GoDaddy account and open Domain Portfolio (from your account menu or My Products → Domains).
- Click the domain you want to update to open its settings page.
- Open the DNS tab, then select Nameservers.
- Click Change Nameservers.
- Choose I’ll use my own nameservers.
- Enter your hosting nameservers, one per box (for example
ns1.yourhost.comandns2.yourhost.com). Use Add Nameserver if your host gave you more than two. - Click Save, then confirm the warning that your DNS records will no longer be managed by GoDaddy.
- If Domain Protection is active, GoDaddy may ask you to verify with a code sent by SMS or an authenticator app before the change is applied.
GoDaddy notes
- GoDaddy’s default nameservers look like
nsXX.domaincontrol.com. To switch back, choose the option to use GoDaddy’s default nameservers. - Once you move to custom nameservers, any records you edit in GoDaddy’s DNS page stop having any effect. Make your changes in cPanel instead.
- If you bought a domain together with GoDaddy hosting or Website Builder, check that nothing else on your account still depends on GoDaddy DNS before switching.
How to change nameservers at Namecheap
Namecheap calls this option Custom DNS. The steps are short:
- Log in to your Namecheap account.
- In the left sidebar, click Domain List.
- Click Manage next to your domain.
- Find the Nameservers section and open the drop-down menu.
- Select Custom DNS.
- Type your hosting nameservers in the boxes (format
ns1.example.tld). Click Add Nameserver for extra entries. - Click the green tick (checkmark) to save.
Namecheap notes
- If your host gave you nameservers and IP addresses, enter only the nameserver names. The IPs are not needed here.
- Namecheap’s other options are Namecheap BasicDNS (their free default), Namecheap Web Hosting DNS (for their own hosting) and PremiumDNS (paid). Choose Custom DNS for third-party cPanel hosting.
- Records you added under Advanced DNS are not carried over when you switch to Custom DNS. Re-create anything important in cPanel.
- Namecheap says DNS updates can take up to 24 hours, occasionally longer.
- Some country-code domains have extra rules. For example, certain ccTLDs require a minimum number of nameservers. Namecheap will show an error if yours does not meet them.
Cloudflare: two very different situations
“Cloudflare” can mean two things, and the steps are completely different. Work out which one applies to you first.
| Your situation | What you do |
|---|---|
| Domain is registered with Cloudflare Registrar | You cannot switch to your host’s nameservers. Keep Cloudflare DNS and add records that point to your cPanel server (see below). |
| Domain is registered elsewhere (GoDaddy, Namecheap, etc.) and you want to use Cloudflare for DNS and CDN | Add the site to Cloudflare, then change the nameservers at your registrar to the two Cloudflare nameservers. |
Case 1: Domain registered with Cloudflare Registrar
Cloudflare Registrar requires every domain it registers to use Cloudflare’s own nameservers. There is no option to replace them with ns1.yourhost.com. (Business and Enterprise plans can use branded “custom nameservers”, but those still run on Cloudflare.) This is not a problem, because you can still connect the domain to your cPanel hosting with DNS records:
- Find your cPanel server’s IP address. It is shown under General Information on the right side of the cPanel dashboard (Shared IP Address).
- Log in to the Cloudflare dashboard and select your domain.
- Go to DNS → Records.
- Edit or add an A record for
@(the root domain) pointing to your cPanel server IP. - Add a CNAME record for
wwwpointing toyourdomain.com, or a second A record forwwwwith the same IP. - For email on your cPanel server, add an A record for
mailpointing to the server IP. Set its proxy status to DNS only (grey cloud). Then add an MX record for@pointing tomail.yourdomain.com. - Copy your SPF and DKIM TXT records from cPanel’s Email Deliverability page into Cloudflare.
If you really need your host’s nameservers, the only way is to transfer the domain from Cloudflare to another registrar. Note that a newly registered or recently transferred domain usually has to wait 60 days before it can move.
Tip: With the orange cloud (proxied) on, Cloudflare sits in front of your site. Set SSL/TLS mode to Full (strict) once your cPanel AutoSSL certificate is issued. The “Flexible” mode often causes redirect loops with WordPress.
Case 2: Moving a domain’s DNS to Cloudflare
Many site owners keep the domain at GoDaddy or Namecheap but use Cloudflare’s free plan for faster DNS, caching and DDoS protection. Here, you change nameservers to Cloudflare:
- In the Cloudflare dashboard, go to Domains and choose Onboard a domain (sometimes shown as “Add a domain”).
- Enter your root domain, for example
yourdomain.com, and continue. Select a plan (the Free plan is fine for most sites). - Review the DNS records Cloudflare scanned. Check the root A record,
www, and all email records (MX, SPF, DKIM,mail). Add anything that is missing. - Cloudflare now shows two assigned nameservers, with names like
name.ns.cloudflare.com. You can also find them later on the domain’s Overview page. - Turn off DNSSEC at your current registrar if it is on.
- At GoDaddy or Namecheap, follow the steps above and enter the two Cloudflare nameservers exactly as shown.
- Back in Cloudflare, wait for the status to change from Pending Nameserver Update to Active. Cloudflare also emails you when this happens.
- Once active, you can re-enable DNSSEC from Cloudflare if you want it.
After this, manage DNS in Cloudflare, not in cPanel’s Zone Editor. Changes made in cPanel’s Zone Editor will no longer be visible to the internet.
How long does a nameserver change take?
The registrar usually updates the domain’s registry record within minutes. However, internet service providers and public DNS resolvers cache the old answer for a while. In practice:
- Many visitors see the new server within 1 to 4 hours.
- Allow up to 24 hours for most of the world, and occasionally up to 48 hours.
- Your own computer may hold the old answer longer than other people’s. Try mobile data, a different browser or a private window.
How to check that the change worked
Use any of these methods to confirm the new nameservers are live:
- Command line (macOS/Linux):
dig NS yourdomain.com +short - Command line (Windows):
nslookup -type=NS yourdomain.com 8.8.8.8 - Online: a WHOIS lookup or a global DNS propagation checker will show which nameservers are being returned in different countries.
When the new nameservers appear, open your site and send a test email to and from your domain. Then check in cPanel under Security → SSL/TLS Status that AutoSSL has issued a certificate. If it hasn’t, run AutoSSL again. Our free SSL guide explains how.
Common problems and fixes
“Nameserver is not registered” or “invalid nameserver” error
Check the spelling carefully and make sure there is no trailing dot or space. If your host uses private (child) nameservers such as ns1.yourdomain.com, those must first be registered at the registrar with their IP addresses (often called glue records or “host names”). Ask your host for the correct IPs.
Website works but email stopped
Your MX records did not move with the nameservers. Re-create them in the place that now controls DNS: cPanel’s Zone Editor if you moved to your host, or Cloudflare if you moved there. Our Zone Editor guide walks you through MX, TXT and CNAME records.
Domain stopped resolving completely
This is almost always DNSSEC. Remove the DS record (disable DNSSEC) at the registrar and wait an hour or two. Also confirm that the domain has been added to cPanel so the server has a zone to answer from.
Cloudflare stuck on “Pending Nameserver Update”
Confirm that you replaced all old nameservers and did not just add Cloudflare’s alongside them. Check that both names match exactly what Cloudflare assigned to your account; every account gets different ones.
Old website still appears
This is usually caching. Clear your browser cache, flush your local DNS (ipconfig /flushdns on Windows), or test from a phone on mobile data.
Frequently asked questions
Will changing nameservers delete my website?
No. Your files stay on whichever server they are on. Changing nameservers only changes where visitors are sent. You can switch back at any time if needed.
Do I need to change nameservers if I only use Cloudflare Registrar?
You can’t. Cloudflare Registrar domains must use Cloudflare nameservers. Point your domain to cPanel hosting using A, CNAME and MX records in Cloudflare’s DNS instead.
How many nameservers should I enter?
Enter every nameserver your host provides, usually two and sometimes up to four. Don’t mix your host’s nameservers with another provider’s.
Is it better to change nameservers or just the A record?
Changing nameservers is simplest when your host manages everything (website, email and SSL). Changing only the A record is better when you use a separate email service or want to keep DNS at the registrar or Cloudflare.
Does the change affect my domain renewal or ownership?
No. The domain stays registered at the same registrar, renews in the same account and remains in your name. Only the DNS delegation changes.
Conclusion
Updating nameservers takes only a couple of minutes at GoDaddy, Namecheap or Cloudflare. The important work happens before and after: note your existing records, turn off DNSSEC, enter the nameservers exactly, then re-create email records and confirm SSL once the change is live. If your domain is on Cloudflare Registrar, remember that you point it to cPanel with DNS records rather than nameservers. Next, secure your inbox with our guide to SPF, DKIM and DMARC in cPanel.



