Let us guess. You have just moved from one hosting to another and your site is not loading? After a quick search, you found “DNS propagation.”
So, what is DNS propagation? 📡
In short, DNS propagation is the process of updating your newest DNS changes all over the Internet. In this article, we will explain what it is in greater detail, why it takes so long, and how you can make it faster.
📚 Table of contents:
- What is DNS?
- What is DNS Propagation?
- How does DNS Propagation work?
- What can I do to lower the time it takes?
- DNS tools to check the DNS propagation
- DNS Propagation FAQ
What is DNS?
The Domain Name System (DNS) is a hierarchical and distributed system that connects domain names to IP addresses and provides additional information about the domains. The DNS allows you to type a domain name like Google.com and access its server without knowing its IP address. The DNS will translate your request (Google.com) and find its IP address – 18.104.22.168.
If the DNS didn’t exist, we wouldn’t be able to access any site or service, without knowing and typing its IP address. You would need to remember thousands of IP addresses of everything that you need, and manually edit this register, every time any of these sites or services would change their IP address. Instead, you can type a domain name, and the DNS does the rest.
Inside the DNS settings of a domain you can find settings about emails, different verification and authentication records, redirects, and additional information about the domain.
What is DNS propagation?
DNS propagation is the process of updating domain changes across the internet. 🌐
When the domain administrator changes any DNS record inside the primary DNS server (the server that you manage your domain from), this information usually becomes public instantly. In the most common configuration, the primary DNS server notifies the secondary servers about the changes, and that triggers complete or partial zone transfer (update of the DNS records).
But changes on a domain level don’t translate to changes on a global scale. As we already mentioned, the DNS is a distributed system and the rest of the DNS servers won’t get automatically updated. The reason for this slow update is to lower the resource use. Instant propagation for everybody all over the internet would take too much processing power. This is where DNS records’ TTL come in.
Each DNS record has a TTL (time-to-live) value. Every DNS admin sets the TTL value on each DNS record. This is the time that the servers should keep the DNS records inside their cache. The lower the TTL is, the faster the domain propagation will be. But sometimes it is also useful to set high TTL values to reduce the stress on the DNS servers.
Many companies that manage networks (data centers, B2B network providers, internet exchange points, content delivery networks, etc.) will have their own DNS servers, which won’t automatically update if they have an older version of the DNS data for your domain which is still valid (based on the TTL value).
Also, the Internet service providers (ISPs) have DNS servers that need to get the updates too. All ISPs have DNS cache storages that might have longer TTL values than what the domain administrator has defined on the domain’s DNS records. They do this to balance the load on their servers. That can delay the propagation.
And finally, there are the end-users. Each of their devices has a DNS cache, holding DNS records about the visited domains. They will keep using the old DNS records until they expire. After the cache expires, the device will no longer keep it. If the user wants to visit the domain again, its device will perform a new DNS query and get the current address records.
In the end, it is common that domain propagation across all servers and devices can take up to 48 hours, and even up to 72 in some cases. ⏰
How does DNS propagation work?
- The DNS change. A DNS administrator changes one or more DNS records, such as A records. This process happens inside the primary DNS server of the domain and will redirect the users to the new address when the users get the new record. In most cases the primary DNS server that you use for your domain will be the one of the domain registrar company.
- The primary DNS server can notify the secondary DNS servers about the update. The secondary servers will check the notification and will initiate a zone transfer to obtain the latest data from the primary. But that is not a complete process. The users still have old data.
- TTL countdown. Other recursive servers and user devices have DNS caches that hold DNS records. The time they keep them is defined by their TTL values. The first time each server or user obtains a DNS record, they will start keeping it inside their cache. So, if a user visited the domain before, he or she will have the old DNS record pointing to the wrong place. This record must expire and the user needs to perform a new request to get the update.
- The propagation begins. All users and recursive servers will eventually be left with expired DNS records about the domain. They will need the new ones and will start a new query to get them. This is when the domain propagation really begins. The users will get the new records and so will all the recursive servers.
- Propagation finishes. When there is no user or server left in the world that holds the old DNS records, the domain propagation is completed. This time will depend on the TTL value of the updated records, the TTL values that different ISPs have set for their DNS cache servers, and TTL values inside the DNS cache of the users.
- Normal functionality. Everyone has access to the new records. The propagation finished and now everybody has access to the correct DNS records. This will be true until a new DNS change happens inside the domain and then the process starts from the beginning.
What can I do to lower the time it takes?
- Lower the TTL. The TTL of the DNS records can be very high, sometimes it can be days. Lower it to a value between 300 (5 minutes) and 600 (10 minutes). When the current DNS records expire, this value will take effect. Take in consideration that some hosting providers set a minimum time. In the case of Bluehost, it is 14400 (4 hours).
- Manually clear your domain from DNS cache servers. Big cloud providers allow you to manually remove your domain and its records, from their DNS cache servers. By doing this, you will be able to remove the old DNS records, and their users will be able to get your new records. You can do this with OpenDNS, Cloudflare, and Google.
- Push notification for zone transfer. After you have performed the changes in your primary server, push notification for zone transfer to your secondary servers. They will need to get the new data. This often happens automatically.
- Perform the changes during off-peak hours. After you have lowered the TTL, it is time for the final change. Do it during off-peak hours when there is not so much traffic. That way, only a few users will be interacting, and there will be more time to guarantee that propagation occurs before people visit your site.
- Communicate with your users. You can create an announcement about your domain changes. You can mention which is the new IP address of your domain or other changes that you have made. You can share a tutorial with them about how to flush the DNS cache if they want to make sure they end up in the right place.
These are the steps that you can take to make your domain propagation faster. Everything else is outside of your hands and will require you to patiently wait.
DNS tools to check the DNS propagation
There are many tools available to check the progress of DNS propagation. This allows you to actively monitor and verify if the DNS update has propagated successfully, rather than simply waiting.
To accurately check the DNS propagation, you should first flush the DNS cache on your device. The method for doing this depends on your operating system:
- Windows: Use the Command Prompt and enter the command
ipconfig /flushdnsto flush the DNS cache.
- macOS: Open the Terminal and use the command
sudo killall -HUP mDNSResponder. This restarts the DNS service and flushes the cache.
- Linux: The command to flush the DNS cache varies based on the specific Linux distribution. For distributions using
systemd, the command is
sudo systemd-resolve --flush-caches(note the two dashes before
flush-caches). However, if your Linux distribution does not use
systemd, you’ll need to use a different method or command appropriate for your specific distribution.
It’s important to use the correct method for your operating system to ensure the DNS cache is properly flushed. This step ensures that when you check for DNS propagation, you are receiving the most current information.
You can then check domain propagation using one of the methods below.
Check domain propagation on Linux and macOS
On both Linux and macOS, you can use the
dig command, as it is typically included in these systems.
- Open the Terminal.
dig A example.com. Replace
Awith the type of DNS record you want to check (e.g.,
MXfor mail exchange,
NSfor name servers) and
example.comwith the domain you are investigating. The
digcommand will provide detailed information about the specified DNS record for that domain.
Check domain propagation on Windows
To check domain propagation on Windows, you can use the built-in
nslookup command, which allows you to query specific DNS records.
- Open the Command Prompt.
- Type the command
nslookup -type=A example.com. Here, replace
Awith the DNS record type you wish to check (e.g.,
MXfor mail exchange servers,
NSfor name servers) and
example.comwith the domain you are investigating. The
nslookupcommand will then provide detailed information about the specified DNS record for that domain.
Check domain propagation with Online DNS propagation checkers
- Visit one of these online DNS tools.
- Type the domain name that you would like to query and select the type of DNS record you would like to see.
- Click Search.
DNS Propagation FAQ
How long can DNS propagation take?
Typically, a DNS change takes around 48 hours to fully propagate. You should know that a DNS propagation can take anywhere from a second to 72 hours, or even longer. The process will depend on the TTL of the records, the type of the DNS records, the geographical location between the primary server and the rest, and finally, the ISPs’ caches and their settings.
Could you make the DNS propagation faster?
Yes, but still your actions will be limited. You can prepare your domain, by lowering the TTL values of the record or records you want to update. That way, the records will stay inside the DNS cache of servers and users but less time. When you make the changes, they will expire quicker and the servers and users will get the newer ones faster.
Why is the DNS Propagation not ready yet?
Because it depends on the TTL of your records, and configurations of hundreds and thousands of DNS servers that will have DNS caches. The user devices will also have cache memory too. The previous DNS records will stay there as long as their current records about your domain are still valid. You can only manage your side of the DNS – your DNS zones. You should be patient about it and wait until the domain propagation finishes.
Now that we’ve explained DNS propagation, you know that changes take time even across the internet.
You can take different actions to make the DNS propagation smoother like lowering the TTL values of your DNS records, before you decide to make bigger changes. That is not difficult and is what most of the domain administrators do before moving to another server or making another big change.
And yet, the most important is to be patient and to wait until the propagation takes place. While you wait, it will be the perfect time to read about the AAAA record and how to configure it.