DNS Server Change Propagation – Why You Need to Wait?

I see a page from the old server, and my neighbor already from the new one?

Let’s start from the beginning, what are DNS servers?

In order for a website to be visible on the Internet, there must be a server on which the website files are located. Such a server has a public IP address, thanks to which any device on the Internet can connect to it and download the page. However, the IP address does not look very good and is quite difficult to remember, for example: 91.211.222.16

Domain names were invented to make the internet a friendlier place. A domain is a friendly name, thanks to which we do not have to remember the IP address.

An example domain is: domena-klienta.pl

But how does the browser know with which server, i.e. with which IP address, it should connect to download the page?

Each domain should point to at least two DNSs (domain name servers), i.e. servers that convert the domain name to an IP address. For example, the hosting company Smarthost has three independent DNS servers of its own:

dns.smarthost.au

dns2.smarthost.au

dns3.smarthost.au

DNS server addresses are provided in the domain registrar’s panel. They are recorded at the master recorder. In the case of domains ending in .pl, NASK is the main registrar.

If you have purchased a domain from Smarthost, our DNS is set by default. So just add the domain via cPanel → Additional domains so that our DNSs will assign the domain the correct IP address on our specific server where you will place your website.

How exactly does a web browser query DNS servers?

The path that the browser must take to find out what IP address is behind the friendly domain is shown in the diagram:

Do DNS Entries Have a Cache? What Does TTL Mean?

However, it turns out that this path is not always taken. To alleviate DNS servers and protect them from millions of queries per second from around the world, it has been decided that the IP address behind the domain will be remembered in the cache of devices along the path from the browser to the domain’s DNS.

The time the address is kept in this cache is called TTL (Time To Live). It can be set for individual records through, for example, the Zone Editor in cPanel.

In each of the places on the left side of the diagram, the website address can be stored in the cache. The caches are independent, meaning the TTL value is recorded independently. The countdown to re-fetching the address is also independent.

This means that when you first visit a website, with a TTL of 4 hours, the next refresh will occur in 4 hours at all points along the way, provided no one has accessed the site earlier.

For example, if someone in your home has accessed the site from another computer, it will be in the cache of your router, your internet provider’s network devices, and the public DNS caches you use. When you access it from your computer, you will receive the address from the router’s cache and store it on your computer and browser with a fresh TTL, in this case, 4 hours. During this time, the TTL on the router and further devices will already be lower than 4 hours, so it might happen that other household members will see the site at a new IP address while you still see the old one on your computer.

A similar situation occurs if someone using your internet provider’s services accesses the site or if someone in the world accesses the site using the same public DNS as you. You will all be at different stages of the TTL countdown, so if the IP address of the site changes, you will be at different stages of propagation.

Propagation is the broadcasting of the new address of a site, which occurs at different stages on different devices on the internet. Propagation depends on the TTL value.

Changing DNS Servers, or Propagation

Propagation occurs whenever a DNS record changes; it doesn’t have to be a change in the domain’s DNS. It can also be, for example, moving a hosting account from one server to another within the same hosting provider’s data center. In this case, the DNS with the domain registrar remains unchanged, but the server’s IP address changes.

How to Speed Up DNS Propagation?

  • If the old IP address is stored in your browser, you can simply close and reopen it, and sometimes you also need to clear the cache.
  • If the address is cached on your computer, you can restart the computer or use a command, for example, in Windows, the command is ipconfig /flushdns.
  • For the router, you can unplug it from the power and plug it back in, which should clear its DNS cache.
  • For devices further along (internet provider, public DNS), we cannot clear the cache, so we must wait for their TTL to expire and fetch a fresh address.

How Can You Avoid Long DNS Propagation?

If you change the TTL to a low value, such as 300 seconds (5 minutes) before changing the domain’s DNS, the propagation time on all devices will be no more than 5 minutes.

Note:

You must change the TTL well in advance, adding the current TTL because the current cache is kept with the current TTL. It is best to set the TTL a day or two before changing the domain’s DNS so that its transfer to another server, and thus the change of the site’s IP address, is already with the new TTL.

Updating DNS Records on the Previous Hosting – For What Purpose?

It’s also advisable when changing the domain’s DNS to update the individual A and MX records to the new ones on the old hosting as well so that queries reaching the DNS servers of the previous hosting also see the new IP address. This should speed up propagation in some situations.

It also solves the later problem of undelivered emails sent by other users of the old hosting. They use the DNS of the old hosting, which may not go beyond its own records and thus not see the new DNS set for the domain at the domain registrar.

Smarthost

Leave a Reply