DNS propagation, TTL, and the timing for server switching without downtime
- Why can’t DNS settings be changed all at once?
- The transitional period during a WordPress migration is particularly daunting for the following reasons.
- The Time To Live (TTL) value must be lowered before changing the server.
- The key to avoiding downtime is not the transmission speed.
- There are cases where the problem cannot be resolved even by lowering the TTL (Time To Live) value.
- There is a separate timetable available that is tailored to my specific situation.
- Preparing content for a new server using LUX Content Migration.
- Frequently Asked Questions.
- WordPress-related links
Even after changing the server, some users are accessing the new website, while others are still seeing the old one. Is it possible that the website has been duplicated?
That is not the case. DNS propagation is not a process where a domain instantly points to a new server, but rather a process where multiple DNS resolvers gradually update the addresses they have stored.
So, if you want to change the server without any downtime, when should you change the DNS settings?
Why can’t DNS settings be changed all at once?
When you enter a domain name, the DNS resolver finds out which server that domain is associated with. The resolver does not query from the beginning every time, but temporarily stores the answer.
This storage time is called the Time To Live (TTL). RFC 1035 defines TTL as the time for which DNS information can be stored in a cache, and the unit is seconds.
For example, if the TTL is 3600 seconds, the resolver can generally use the same answer again without re-checking for up to 1 hour. Even if the sign in front of the house is changed, the photos taken by people who have already visited may not be updated immediately.
Therefore, after the DNS change, different scenes may unfold for each visitor. Some users may be directed to the new server, while others may still be directed to the old server.
Even if the address changes, the memory remains.
The transitional period during a WordPress migration is particularly daunting for the following reasons.
When migrating a WordPress server, the biggest concern is the possibility that users will not be able to access the site simultaneously. However, the actual problem that is more difficult to deal with is the transitional period where visitors are directed to different servers, rather than a complete interruption of access.
If you edit a post on the old server, the content may not be reflected on the new server. Conversely, changes made on the new server may not be visible to visitors viewing the old server.
Although it may appear to be an error, this is a normal phenomenon that can occur during the DNS propagation process. Google Search Central also advises that after changing hosting, one should monitor the traffic, observing a decrease in visits to the old server and an increase in visits to the new server.
Search robots may sometimes be temporarily confused. Google explains that after a website migration, the number of pages crawled by search robots may temporarily decrease, but then increase again over a few days.
In other words, switching servers is not as simple as pressing a single button. It is more like waiting for different clocks to finish at the same time for each person involved.
Transformation is not an instant event, but a transitional period.
The Time To Live (TTL) value must be lowered before changing the server.
The answer to the question is simple: the TTL value should be lowered not on the day of the switchover, but at least before the time required for the existing TTL to expire.
Google Search Central suggests that to quickly update DNS caches, you should lower the TTL (Time To Live) of DNS records to a few hours at least one week prior. AWS also recommends temporarily lowering the TTL before making significant DNS changes, and then increasing it again once the changes have stabilized.
If you lower the TTL on the day of the switchover, it may already be too late.
The safe sequence is as follows:
- Before making any changes, verify the existing TTL (Time To Live) of the web-based DNS records at least one week in advance.
- It reduces the Time To Live (TTL) to a level of several hours.
- First, complete the new server and then check the actual connection.
- Change the DNS settings while keeping the old server active and responsive.
- After comparing the traffic and error rates of both servers, the old server will be shut down.
Previously stored answers with a long Time To Live (TTL) will not disappear immediately when the TTL is reduced on the same day. You must wait for a certain period.
The key to avoiding downtime is not the transmission speed.
Many people are waiting for the DNS to change quickly. However, what is more important is ensuring that the website appears normally, regardless of which server the data is being transmitted to.
Since the new server is not yet fully established, changing the DNS settings prematurely will cause some visitors to be directed to an incomplete system. A safe transition involves first completing the new system, temporarily keeping the old system running, and then changing the address information.
Google’s hosting migration process involves first setting up and testing the new environment, then changing the DNS settings, and providing instructions to monitor both the existing and new servers simultaneously.
Preparation is more important than the speed of transmission.
Changes made in the DNS management interface do not immediately affect the screens of all visitors. AWS explains that while typical record changes can usually be reflected worldwide within 1 minute, the time it takes for a user’s resolver to update and display the new information depends on how long the resolver has cached the previous response.
Cloudflare provides a default TTL (Time To Live) of 300 seconds for records that use the proxy feature. However, it informs users that it may take longer than 5 minutes for them to actually experience the changes due to individual computers or upper-level DNS caches.
The key to reducing downtime is not to accelerate the transmission process.
The task is to operate both servers securely until the broadcast ends.
There are cases where the problem cannot be resolved even by lowering the TTL (Time To Live) value.
Lowering the TTL can speed up the transition, but it is not a universal solution. A short TTL can increase the number of DNS queries and associated costs, while a longer TTL can be beneficial for query speed and stability.
Therefore, instead of always keeping the value low, it is more realistic to temporarily lower it only when there are significant changes, as was the case before. After the transition is stabilized, it can be raised again to match the original operating purpose.
A more significant security breach involves changing the nameserver itself. A nameserver is an address that specifies where DNS information is managed.
Unlike simply changing the record that points to a web server, changing the name server can leave old information with the registrar and resolver. AWS states that this transition period can last up to a maximum of 24 to 48 hours.
The name server change should be considered a separate matter.
When creating a new hostname that did not previously exist, caution is also required. If a negative cache remains that previously indicated the hostname did not exist, lowering the TTL (Time To Live) of the new record may not immediately resolve the issue.
At this point, the limitations of manual processing become apparent. While the management screen indicates that the changes have been completed, it is difficult to compare the access locations for each visitor and the errors on both servers at a glance.
If the old server is shut down too quickly, visitors who still remember the old address will find themselves unable to access the website. Conversely, if the content of the two servers is different, discrepancies may arise in the propagation of updates.
Synchronizing the content of the two servers to the same state is a separate task from clearing the DNS cache. LUX Content Migration allows you to select posts, pages, categories, comments, authors, custom fields, and media from an existing WordPress site and export them to a .wpmpx file, which can then be imported into a new site.
Before importing, you can use the Preview function to check the newly created articles and comments, as well as the number of required images. Therefore, you can establish a separate procedure to verify the scope of content that will be migrated to the new server before making any DNS changes.
The completion shown in the management screen is different from the actual completion of the conversion.
There is a separate timetable available that is tailored to my specific situation.
If you are only changing the hosting provider, reduce the TTL (Time To Live) of the web-related DNS records to a few hours at least one week before the change. Verify the new server first, and then change the DNS while keeping the old server active.
When changing the DNS service, the plan must be more extensive. First, the new DNS zone must be configured identically to the existing one, and the old DNS service must continue to operate.
Simply lowering the record TTL will not eliminate the 24-48 hour transition period for name servers. This is because the name server information itself may still remain.
After the switchover, do not immediately decommission the old server. The standard procedure is to compare the logs of both servers and to shut down the old server only after it is confirmed that all traffic and errors have completely ceased.
The loading time of my website varies depending on the scope of the changes made.
In summary, the safest time to change the DNS is not the moment you make the change. It is the moment when the new server is fully operational, the previously reduced TTL (Time To Live) has expired, and the old server is still responding.
If these three conditions are met, the website will not go down even if some visitors access the old server. The real technology behind server migration is not about a quick switch, but about being prepared to handle a slow transition.
A safe transition is more important than a rapid change.
Preparing content for a new server using LUX Content Migration.
If you need to operate two servers simultaneously during DNS propagation, it is important to decide in advance what to move to the new server. In LUX Content Migration’s Content only mode, you can select and move posts, pages, categories, comments, authors, custom fields, and media, and carry out imports by category. Before importing, use Preview to check the posts and comments that will be newly created and the number of images required. If you need to undo the results, you can use ↩ Roll back for completed categories.
If you only need to apply settings such as unique addresses, widget placement, and menu structure, without modifying the content itself, you can use the “Site settings only” option. In the “Role setting,” you can specify whether the current site should be treated as an existing site or a new site, which allows you to create a workflow for verifying the content and settings of the new WordPress installation before changing the DNS. The actual re-hosting of images and videos to the new site, as well as managing redirects and 404 errors from the previous address, are functionalities provided by the “Actual re-hosting” and “Redirect management” add-ons, respectively.
Frequently Asked Questions.
Q. When should I change the DNS settings on my website?
A. If you are only changing the hosting provider, reduce the TTL (Time To Live) of the web-related DNS records to a few hours at least one week before the change, and after verifying the new server, make the change while keeping the old server active. If you are also changing the DNS service or nameservers, you must configure the new DNS settings in advance and consider a transition period of up to 24-48 hours.
Q. How long will it take if I have to change the nameserver?
A. Due to the remaining name server information in the registration authority and resolver, a transition period of up to 24 to 48 hours should be anticipated. Simply lowering the record TTL will not eliminate this transition period, so configure the new DNS in advance and also maintain the existing DNS service.
Q. Can this problem be easily solved using a tool? What kind of tool should be used?
A. The tool can help verify the status of DNS changes and the connection flow between the two servers. However, the tool alone cannot immediately clear the cache or safely bring a new server online. Therefore, adjusting the TTL (Time To Live) beforehand and operating both servers are necessary first.
Q. How should WordPress content be adjusted before the DNS switch?
A. Before switching the DNS, it is necessary to first verify the content and settings in the new WordPress installation.
LUX Content Migration allows you to specify the scope of the migration, choosing to migrate “Content only” or “Site settings only.” Before importing, it provides a preview function that shows the articles and comments that will be created, as well as the number of images required. If you need to revert the imported categories, you can use the “Roll back” function for completed categories.