-3

Referring to the Question already asked, several people have said

No, as long as both sets of nameservers have the same records you'll experience no downtime.

What does same records meant here? How can I do that?

I currently want to change my hosting only for my website, and want to know If I change Nameserver on previous hosting, will there be any downtime? How can I avoid that?

Shan
  • 1
  • 2
  • 2
    It means you need to ensure all the DNS records in place on the old nameservers are created on the new nameservers before you switch over to them. – ceejayoz Apr 29 '20 at 18:05
  • And what are those DNS records? Does that mean www, and https record? I dont use email so Im not worried about that. Actually Im a newbie that's why. Dont mind my stupidness. – Shan Apr 29 '20 at 18:10
  • Changing nameservers and changing your website hosting is not the same thing. You cannot do both and have the same records on both servers. Moving your website hosting *is* changing records. –  Apr 29 '20 at 18:10
  • Thats what Im asking? How can I avoid downtime during that? or how can I keep same records and avoid downtime when changing host? – Shan Apr 29 '20 at 18:15
  • Vorting to close. SO generic it asks to explain how DNS works - I suggest reading some book and documentation about it or hiring an admin. – TomTom Apr 30 '20 at 08:56

2 Answers2

0

I currently want to change my hosting only for my website, and want to know If I change Nameserver on previous hosting, will there be any downtime?

Leave the Name Servers alone. Change the DNS records for the website.

joeqwerty
  • 108,377
  • 6
  • 80
  • 171
  • A lot of webhosts ask you to just change your authoritative dns server to them to make your website live. It’s just an easy way of switching things over. The original poster needs to make sure the site is working correctly on the new host, possibly by simply asking support to check so he doesn’t have to mess around with host files. – Some Linux Nerd Apr 30 '20 at 05:57
  • `A lot of webhosts ask you to just change your authoritative dns server to them to make your website live. It’s just an easy way of switching things over` - They do, and I've dealt with the fallout many, many times. It's easy for the webhosters, but it's terrible for the customer, who invariably messes up their DNS in the process. Webhosters should focus on hosting websites and leave DNS to the DNS experts. – joeqwerty Apr 30 '20 at 14:18
0

On a site whose content is static, this is fairly easy - have the identical site on both old and new locations during the changeover period. A gotcha to be aware of is https/SSL certificates - particularly if running something like certbot you will need to ensure certificate validity on both systems during the changeover window.

On a dynamic site, this is a LOT harder. Depending in how you handle sessions you may be able to rig up some kind of replication, or take a view that you can disconnect everyone as long as they can immediately reconnect (or some other solution). The trick here is to make use of a reverse proxy/load balancer. There are different ways to do this - one might be to migrate the site to a preconfigured load balancer, then point the load balancer to new IP, then again update DNS, then remove load balancer. There are plenty of variations on the theme, including turning the old system into a reverse proxy for the new system in the interim.

Another possibility with a different set of challenges could be to migrate the system to a new domain, then at the appointed time redirect from old to new URL, then move traffic back to old URL after DNS updating is done.

An important aside - if a short period of downtime for current users is OK you can reduce TTLs in DNS to 60 seconds (lower is not a good idea) - in that way the vast majority of users will be switched from old to new server in a minute or 2.

davidgo
  • 5,964
  • 2
  • 21
  • 38