All posts

Blog

Nameservers vs DNS Records: What's the Difference and Which Should You Change?

Illustrated cover for the Domains & DNS guide "Nameservers vs DNS Records: What's the Difference and Which Should You Change?"

When you connect a domain to hosting, you'll usually be told to do one of two things: change your nameservers or update your DNS records. They sound similar, they both "point your domain", and mixing them up is one of the most common causes of "my site isn't working".

Here's the difference, in plain English.

The simple version

  • Nameservers decide who is in charge of your domain's DNS.
  • DNS records are the actual instructions: where your website is, where your email goes, and so on.

Think of nameservers as choosing which office keeps your address book, and DNS records as the entries in that book. You set the nameservers at your domain registrar. You edit DNS records at whichever provider the nameservers point to.

How it fits together

  1. Someone visits yourdomain.com.
  2. Their computer asks the registry for .com: "Who's in charge of yourdomain.com?" The answer is your nameservers.
  3. It then asks those nameservers: "Where's the website?" The answer is your A record, an IP address.
  4. The browser connects to that IP address and loads your site.

So if your nameservers point to Provider X, only the DNS records at Provider X count. Records you add anywhere else are ignored.

Option 1: Change your nameservers

When you change nameservers to your hosting company's, your host takes over your DNS. For most people, this is the easiest option, because the host creates the right records for your website, email and SSL automatically.

Your host's welcome email lists the nameservers to use, usually a pair such as ns1.yourhost.com and ns2.yourhost.com.

Choose this if:

  • You're setting up a new site and email with your host
  • You don't have other services relying on custom DNS records
  • You want things to "just work"

Changing nameservers replaces your whole DNS zone, so if you have custom records elsewhere, such as email hosted with another provider or a verification TXT record, recreate them in your hosting control panel.

Option 2: Keep your nameservers and change records

If you want to keep DNS where it is, for example because email or other services are already set up there, you can point just the website.

Typically you'd update:

Name Type Value
@ A Your server IP from your welcome email
www A or CNAME Same IP, or your bare domain

If your email will be hosted with your new host too, ask them for the right MX, SPF and other email records.

Choose this if:

  • Your DNS is managed by a service you want to keep using
  • Email is hosted elsewhere and must keep working
  • You have many custom records

Downside: your host can't manage DNS records for you, so you'll add any future records yourself. Free SSL still works, as long as the A records point to your hosting.

How to check which nameservers you're using

Use any online "DNS lookup" or "NS lookup" tool and enter your domain. Or, on a computer with a terminal:

nslookup -type=ns yourdomain.com

If the result shows your host's nameservers, edit records in your hosting control panel. If it shows another provider, edit records there.

How long do changes take?

  • Nameserver changes can take up to 24 to 48 hours to reach everyone, though they're often visible within an hour or two.
  • Record changes depend on the record's TTL. Often minutes to an hour.

During the change, some visitors may see the old site and some the new. That's normal. Read what is DNS propagation?

Common mistakes

Adding records at the registrar when the nameservers point elsewhere. They're ignored. Always edit DNS where your nameservers point.

Changing nameservers and losing email. If your email was hosted with another provider, its MX records lived in the old DNS zone. Recreate them before or right after switching.

Using the wrong nameserver pair. Some hosts use different nameservers for different server types. Your welcome email lists the right pair.

Typos. ns1.example.com and ns1.example.net would be different servers. Copy and paste.

Which should you choose?

  • New website and email with one host: change nameservers.
  • Website moving, email staying put: keep nameservers, change A records.
  • Complex setups with many services: keep your current DNS and change the records you need.

Frequently asked questions

Can I use my host's nameservers if my domain is registered elsewhere?

Yes. Log into your registrar, find the nameserver settings, and enter the pair from your welcome email. You don't need to transfer the domain.

Do I need to change nameservers and records?

No, it's one or the other. If you change nameservers to your host's, they manage the records. If you keep your current nameservers, you change the records there.

Will changing nameservers affect my email?

It can, if your email is hosted somewhere other than your new host. Recreate those MX and TXT records in your new DNS zone, or point only the website's A records instead.

How many nameservers do I need?

At least two. Enter both of the nameservers your host gives you.

The bottom line

Nameservers choose who manages your DNS. DNS records say where things go. Change nameservers for simplicity, or change records for control, and always edit DNS where your nameservers point. For the details of each record type, see DNS records explained.