How to switch DNS for a website without service disruption?

I would like to switch the DNS of our website without any service disruption

The server IP stays the same.
Usually it takes 24-48 hours to update the whole internet.
Is it possible to have both DNS work in parallel?

Important Note by JamesRyan:

Bear in mind that some DNS servers do not respect low TTLs and cache anyway. Expect some overlap.

^ this exactly is quite a problem.


Background:

I changed the DNS of our website to another Provider (bluehost which seems to be broken and quite often shows their ads page instead of our site) so I switched back to the old original DNS after ~2 hours.

The server's IP remained the same, so I hoped to not get any service disruption, because both DNS show the same server.

Now 24 hours later 30% of the internet still uses the broken / wrong provider (bluehost), which is not referenced in the whois. (concerning to Pingdom + several user report that they can't visit us)


Solution 1:

Proper way to do it:

  1. Change the zone TTL to minimum - in most cases it's 300 seconds (5 minutes). Do not change any records at this stage.
  2. Wait 48 hours.
  3. Do the change. It will take just 5 minutes to propagate the changes.
  4. Revert TTL to standard 48 hours.

This procedure applies to all changes, not just NS changes. If you need to change the IP address for the A record, it will work exactly the same way. While this may not be absolutely necessary and in theory you could run two name servers at the time it's bad idea. You never know if you won't need to do emergency changes during this 48 hour period.

Solution 2:

If you are changing your DNS provider (the nameservers displayed in whois) then yes you can run them in parallel. Looking at my domain, the TTL used by the GTLD servers (the ones that tell other Internet users who runs my DNS) is 48 hours. As far as I'm aware it's not possible to have this changed.

Usually all you'd do is get your domain registrar to change the nameserver entries making sure that the new provider is already set up, and that the old provider keeps their entries live for at least 48 hours.

As mentioned in the other answer, if you're just changing your own records, you can reduce the TTL on the record beforehand to give a near-instant swap over, although some bad DNS servers will still cache for longer.

Solution 3:

First, let's get our terminology straightened out because it's not yet clear what you are asking.

There are three parts to your hosting setup:

  1. The registrar
  2. The nameserver hosting
  3. The server hosting

It's not uncommon for all three of these to be provided by the same company but there's no requirement for it. It's also quite common for there to be no separate charge for 2. when you have bought 1. from the same company, adding to the confusion.

The registrar is responsible for telling the maintainers of the parent domain that your domain exists and what its nameservers are.

The nameservers are responsible for mapping your domain and subdomains to IP addresses (and all of the other things that nameservers can do).

The server is the part you are probably most familiar with and is where the website requests and emails end up.

Once you are sure which one you have changed or want to change, can you modify the question to make it more clear?


I'm going to assume that you are changing your nameserver hosting. To do this, you must:

  1. Find a new nameserver host and set up all the records with them that you have at your current nameserver host.
  2. Contact your registrar and ask them to change the authoritative nameservers to be the new ones that you just set up. This step will take some time as they may not do it immediately and the TTLs involved are often 48 hours.
  3. Once all new DNS requests are arriving at the new nameservers, shut off the old ones.