A long Domain Name System (DNS) propagation time can dampen a website owner’s mood during an important site feature launch or migration. Propagation, here, refers to the estimated time for any change done to DNS information to be updated across the web.
Propagation causes different DNS to cache information at different times. So when you change the nameservers, while some visitors can see the changes, some others will still be directed to the old server for a while.
The speed of the entire process can take about 24 to 48 hours depending on location and the internet service provider.
What Happens During a DNS Propagation?
Image credit: wikemedia
To give context, imagine that you live in a different location from where you’re hosting your domain. Then you changed the nameservers for that domain.
When you type your domain in a web browser, the request doesn’t go directly to your hosting server. It’ll first go to your ISPs local DNS server.
Your search will end here if the IP address of the domain has been cached locally. Otherwise, your ISP will have to send a query to the root DNS server.
The root DNS server will point the local DNS server to the authoritative DNS server for that domain.
Now, when the local DNS queries the authoritative server, it reveals the IP address for that domain and other useful information. The local DNS will then, cache a copy of this information to reduce the load on the root server and speed up future queries.
Each time we change the DNS records for our domain, the new information updates the cache. However, the local DNS can only hold this information for a stipulated time. Once the data is deleted, you’ll have to repeat the process to visit the same domain.
What Factors Affect DNS Propagation?
The internet should naturally update itself with the changes you make on the DNS records. The period within which this update happens is the propagation time. Usually, this should take some hours, but it might last for 48 hours if it’s a complete internet propagation.
This delay can result from several factors, including your:
- Time to Live (TTL) settings
- Internet Service Provider (ISP)
- Domain Registry
Time to Live (TTL)
Image credit: wikimedia
The TTL setting is part of all DNS records. It represents the period when the server caches information for your DNS records.
Let’s assume you want the servers to locally store data for two hours before retrieving the update from your nameserver. You’ll have to specify a TTL of two hours for that record.
A shorter TTL might improve your propagation speed but can also slow your site’s performance by increasing the number of name server requests.
However, you can’t increase the DNS propagation time by changing the records immediately after modifying a zone record’s TTL. The ISP must cache the new TTL prior to when you make the DNS change before this can work.
So, it might be better for you to reduce your TTL several hours before modifying the DNS records.
Internet Service Provider (ISP)
ISPs store data locally to increase web browsing speed, which also reduces propagation time. To improve the browsing experience of their customers, each ISP caches DNS records.
So, when a particular ISP’s customer sends you an email or visits your website, the ISP caches a record of the nameservers that your domain name has been deligated to. It also keeps the zone records that exist on them.
Now, when another customer from that same ISP visits your site or sends you an email, the process is faster. The ISP finds the cached record, and this customer gets a better browsing experience.
Your Domain Name’s Registry
When you change your domain name’s nameserver, the change request might get to the registry within a few minutes. The registry will, in turn, publish the new nameserver record to their root zone.
Most registries will make the update promptly. Albeit, to protect root nameservers from overuse, some registries might set their TTL as high as 48 hours or more.
Although recursive nameservers shouldn’t cache the root nameserver records, some ISPs go on to do so. Thus, increasing the nameserver propagation time.
Normally, it should take a few hours to propagate your DNS updates. But since our control over the situation is limited, it sometimes takes up to 48 hours for the DNS to reflect in the whole internet.
However, if you don’t see an update at the end of 48 hours, the problem might be different from DNS propagation. So, check your DNS settings for errors.