Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.
  • I would like to move my website from host A to host B
  • I have uploaded a copy of my site to the new host, while keeping the old copy in place with the old host
  • I will need to update the nameservers to point to the new nameservers.
  • I'll want to change the DNS settings of domain name to point to new host b

To avoid down time for the DNS change to propagate through the net, can I add the old nameservers and new nameservers together without causing problems, or must I delete the old nameservers first?

What happens to my website when it points to two different nameservers?

share|improve this question
add comment

migrated from stackoverflow.com Feb 6 '12 at 13:26

This question came from our site for professional and enthusiast programmers.

2 Answers

up vote 3 down vote accepted

It's normally OK to have different nameservers for single domain, though you don't need it.

What I would do is the following (I use www.example.com as your website address and 1.1.1.1 as a webserver address for your NEW hosting.)

Check that the new nameservers work

nslookup
server ns1.newhosting.com
www.example.com

You should get an answer like

Name:    www.example.com
Addresses:  1.1.1.1

Make sure your website actually works on the new webserver

open "hosts" file (normally in C:\WINDOWS\system32\drivers\etc\) in notepad and add one row

1.1.1.1 www.example.com

Now open www.example.com in your browser. You will see how your site behaves on the NEW location.

Move

Just change nameservers from the old ones to the new ones. Because of propagation delays, some users will still access the old site for several days. After about a week, or if you know that old site no longer accesses (in case you have some statistics or access logs) - you can remove the old site and old nameservers are no longer needed.

share|improve this answer
add comment

You can have your domain name in multiple nameservers at once, in fact, most registrars require at least 2 nameservers for your domain name (which can theoretically be the same machine with 2 ip addresses, but is not advised because of the problem that would give when that machine would go down (which would be that no resolving is possible)).

The bottom line is whatever the registry that registered your domain name has set as so called Authoritive nameservers. Those will be the nameservers that are queried for the records. Your domain name can be in 100 other nameservers, but that won't affect how it's resolved, since they are not authoritive for your domain.

So, yes you can create a DNS zone in your new nameservers with the new IP addresses already. The change only gets effective from the moment your registry updates the authoritive nameserver records for your domain (plus after that the time that the TTL of the records is set to, before it starts resolving to the new host).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.