Ahosting Logo
Knowledge Base

How to Update Your Domain Nameservers

Nameservers are set at your registrar, and everything about changing them is registrar-side: where the field is, what stops you saving it, and what other registrar settings interfere. This article covers that half.

What happens afterwards (propagation, verification, and when you should change records instead) is the DNS side, and it is covered separately in How to Change Nameservers for Your Domain.

Do you need to change nameservers at all?Are the website and the mail both moving to the same host?YesChange the nameserversand recreate every record at the new provider firstNoChange the records insteadediting an A record moves the website withouttouching mailChanging nameservers hands the whole zone over. Changing one record changes one thing, which is far easier to undo.

Find out where the domain is registered

Not where it is hosted, and not where you think you bought it. Those differ more often than people expect, particularly when a developer or an agency handled the purchase.

whois example.com | grep -i registrar

The registrar named there is where the change is made. If you have no login for it, that is the actual problem to solve first, and if the domain is in somebody else's name, it is theirs rather than yours to change. How to Work with a Web Developer on Your Hosting sets out that situation.

Where the setting lives

Every registrar labels it differently. Look for the domain's own management page and a section called nameservers, DNS, or occasionally "DNS management", which confusingly is sometimes a different screen for editing records rather than for setting nameservers.

Most registrars present two choices: use their own nameservers, or enter custom ones. Choosing custom is what you want when pointing the domain at your host.

Enter all the nameservers your host gives you, usually two, sometimes more. Entering one works until that server is unavailable, at which point the domain stops resolving with no other symptom.

The lock will stop you

The most common reason a change cannot be saved.

Registrar lock prevents changes to the domain, and on many registrars that includes nameservers. The interface may say the change failed without saying why.

Unlock, make the change, and lock it again afterwards. Leaving it unlocked is a real exposure. What Is Domain Locking and Why You Should Enable It goes into it.

DNSSEC has to come off first

The failure that takes the domain down completely rather than partially.

If DNSSEC is enabled, the DS record at the registry is tied to the keys of whoever currently signs your zone. Changing nameservers without removing it leaves resolvers expecting signatures the new nameservers cannot produce, and the domain becomes unresolvable for anyone using a validating resolver.

Disable DNSSEC at the registrar first, wait for the DS record to expire from caches, then change the nameservers, and re-enable it at the new provider afterwards. Understanding DNSSEC walks through the order.

Private nameservers need glue

If you are pointing the domain at nameservers on your own domain, ns1.example.com for example.com. There is a chicken-and-egg problem: resolvers must find those nameservers before they can ask them anything.

Glue records solve it, and they are registered at the registrar rather than in your zone. A private nameserver set up without them appears configured and does not resolve. How to Set Up Private Nameservers in WHM walks through registering them.

Check the registrant contact while you are there

Renewal notices, expiry warnings and transfer authorisations all go to the address on the registration.

Two rules: it should be an address you read, and it should not be on the domain you are about to repoint, if the change goes wrong, mail to that address may be exactly what stops working. What Happens When a Domain Expires goes into what that costs.

A transfer resets this

Worth knowing because it undoes work you have already done.

Transferring a domain to another registrar frequently applies that registrar's default nameservers rather than carrying yours across. The site then stops working shortly after a transfer that appeared to succeed.

Check the nameservers immediately after any transfer completes, alongside the lock and auto-renewal, both of which also reset. What to Check After Transferring a Domain sets out the full list.

When you should not change them at all

If DNS is already managed somewhere you are happy with, moving hosts does not require a nameserver change: editing the A record is enough, and it is a smaller change with a shorter recovery time.

Changing nameservers moves the whole zone, including mail records you may not have copied. That is the mistake behind most "the website moved and email stopped" reports. How to Move DNS to a Third-Party Provider explains doing it deliberately.

After saving

Confirm the registrar actually stored what you entered: reload the page rather than trusting the confirmation message, because a partially saved set is possible and looks fine.

Then the DNS side takes over: propagation, verification, and what to do if the site does not appear. How to Change Nameservers for Your Domain goes into it.

Change them in one edit, not one at a time

Nameserver fields are replaced as a set, and saving them individually produces a period where the domain is delegated to a mixture.

dig example.com NS +short
dig example.com NS @a.gtld-servers.net +short

During a mixed delegation, some resolvers ask the old servers and some the new, and both answer. A domain in that state resolves inconsistently for reasons no single query reveals.

Enter the complete new set, save once, and confirm the parent zone reports exactly what you entered. That second query is the authoritative check; the registrar's own display shows what it stored rather than what it published.

Confirm the destination is ready to answer

Pointing a domain at nameservers that do not yet host its zone takes it offline, and the failure is immediate and total.

for ns in ns1.newprovider.example ns2.newprovider.example; do
  printf '%-28s %s\n' "$ns" "$(dig "@$ns" example.com SOA +short | head -1)"
done

Each of the new servers must already answer for the domain before it is delegated to them. A server returning nothing is one that has not been given the zone.

Ask all of them, not one. A zone created on the primary and not yet transferred to the secondaries produces a domain that works for some visitors and fails for others, which is harder to diagnose than a clean failure. Secondary DNS covers why more than one matters.