How to change name server and have least downtime?

I am currently hosting on Bigrock and my domain name is also from Bigrock. I am facing many issues regarding the server memory and I need to conduct an important event on my website in about 50 hours for which there are registrations going on. I have found a better plan that can solve my problems on Bluehost. The problem is that updating the name server will take a lot of time which I cannot afford to lose. Is it possible that I can add the name server from bluehost in the existing list of name servers so that all can be up simultaneously. Or is there some way out that the site's downtime is reduced as much as it can like I might be running a copy while the other one is being configured.


What you are asking is how to migrate servers by making DNS record changes. You can lower the TTL of the records and make sure both zone files are active (old with the old records and new with the new records) and change the DNS delegation in the domain registrar portal but it can still take as long as 48 hours for everyone to see the new DNS records. So while people see the old records they will go to the old website. If your event is in 50 hours, I would say you should be able to make this work, but the larger issue is since people are doing registrations at the same time, how are you migrating data from the old server to the new server? If you don't do that you will have some registrations on the old server and some registrations on the new server.


To mitigate the issue of DNS delay described above, you can configure the old server as a reverse proxy to the new server, so that any request arriving at the old server is transparently proxied to the new server.

This reverse proxy adds a slight delay, since the request from user comes first to old server, which sends the request to new server, receives response from the new server and sends it back to the user.

So, the working order would be:

  1. Shut down site on old server.
  2. Copy files and databases to new hosting and make sure new hosting works.
  3. Configure reverse proxy at the old site.
  4. Change DNS entries so that only the new site is listed in A records.
  5. After you see that there is no traffic on the old server, you can proceed to get rid of it.

This approach makes sure that there is a single site always available.

You should be able to find several guides on how to do reverse proxying in Apache2 or nginx.