You cannot always stick to just one host or name server forever. Sooner or later, you might feel dissatisfied with a web hosting solutions provider. When hosting services providers fail to do their thing in the right manner, it is time to move on to a new firm! After all, there is no dearth of high quality hosting services providers on the internet. However, if your website is a popular one, you can have a hard time switching your name servers. That’s because the answer to the question ‘Will I lose traffic when switching name servers’ is both ‘yes’ and ‘no.’ The answer really depends on how you do ‘switching.’
Let’s understand how name servers actually work to make your website accessible to internet users from around the globe:
- An internet user’s browser asks its local name server for yourwebsite.com.
- Your local server does not have this information. So it forwards this query to root name severs. A root name server can have the information about the path to yourwebsite.com
- One root server responds to the request and tells the local domain name server that yourwebsite.com is serviced by dns1.your-old-name-server.com and dns2.your-old-name-sever.com. The root server also provides the local domain name server with IP addresses of yourwebsite.com. The request is complete and root server gets back to its work!
- Now an internet user’s local domain name server makes a direct request to dns1.your-old-name-server.com and dns2.your-old-name-sever.com and inquires about IP address of yourwebsite.com.
- Once IP address is confirmed, internet user’s web browser will get connected to the web server of yourwebiste.com.
As described above, a local name server got in touch with two name servers. In the first stage, an internet user’s local name server established contact with one of the 13 root servers and in the next; it contacted the hosting company’s name server directly.
Do it the ‘right-way’ to avoid traffic loss!
When switching name-servers, you can lose a large amount of traffic if it’s not done properly. The wrong way to do switching would be to simply change your name-servers from dns1.your-old-name-server.com and dns2.your-old-name-sever.com to dns1.your-NEW-name-server.com and dns2.your-NEW-name-sever.com. Half of the internet will have little or no idea of your website’s new server and its IP addresses. That’s when thousands of your users will simply fail to access your website on the internet for days. The main reason for this traffic loss is DNS caching. Root name servers or local name-servers will continue to give the same old address of the hosting name server and IP addresses to web browsers of your internet users for a very long time. It can take days or even weeks for new name-server values to reflect on servers around the world.
The best way to avoid this traffic loss is to just change IP addresses in your old name-server. For example, you need not get rid of dns1.your-old-name-server.com and dns2.your-old-name-sever.com immediately. You can just change the IP address to your new hosting server. It works fine and your website will experience no traffic loss!