​​Tips for migrating a website successfully without suffering DNS propagation delays

I was finishing developing a website for a customer who had their website hosted with a provider that focused on developers to do every simple task, like updating their PHP version or configuring their firewall.

I used a newer PHP version for my development, and the customer had an important event coming soon. We didn’t want to risk the old website going down if the PHP upgrade went wrong, so we decided to publish the website on DreamHost by changing the NS records.

Have you heard what they say about how you can’t trust the DNS records to propagate on time whenever needed? That is what happened to me. The change felt like AGES, so I’ll share some lessons so you don’t suffer like I did.

Understand what services you want to migrate

Review your current website’s configuration to make a migration checklist. Do you want to migrate ALL the services associated with your domain or just your website?

  • Is your website using e-mails on the same server, or are they from an external e-mail provider like Google? Will you need to add custom records for this?
  • Does your hosting provider have a staging environment to test your website before going live?
  • Are you launching a website redesign? Is it a new website?
  • Do you have a strict deadline for publishing your site? Is this migration tied to an event or a specific date?

Make sure you add the DNS records you need before migrating the website. 

If you need to change DNS records, having them before the migration occurs is a good idea so you can know their exact syntax and where they should be added. Take, for example, the SPF or DKIM records for e-mail. If you need to add them and can get ahead of time, that is one less thing to worry about.

DNS propagation is a cache problem

The Time to Live (TTL) settings determine how long a local system can hold the information of a DNS record before purging it; if this setting is ignored by one of the several pieces of the DNS chain, the propagation will get stuck. There is no guarantee of accelerating the DNS propagation process.

Make sure you are making the correct changes

Tools like DNS Checker or whatsmydns.net can help you detect the progress of DNS changes geographically. You can also confirm if the changes you made to your NS records are correct with a site like who.is.

Just point the site to the new server IP

Suppose you are primarily interested in your website’s migration. In that case, you can focus on defining or modifying an A record to point your site to the new hostname’s IP, which will usually take less time to propagate than changing the NS records.

There is a minimal TTL time you can define for these types of records; 5 minutes is something reasonable. Just keep in mind that pointing a website to an IP instead of changing the NS records to host a website fully can lead to the site failing to display if, for some reason, the Host changes the IP in which the website is hosted.

Why not both?

If I were you, I would add an A record to point the website to the new server AND change the NS records. This way, if the NS records take time to propagate, the A record will temporarily help.

New domain vs. old domain propagation time

I’ve seen that a new domain propagates faster than an old one because it is slower to override data on ALL the servers than to fetch it for the first time. Remember I told you propagation time is a cache issue? 

If you are hosting a new domain, I recommend that you set their NS records as soon as possible without even visiting the website from your end.

Don’t rush the DNS propagation

There certainly are ways to improve the speed of DNS record propagation, but this technology is as it is for a reason. It is better to have enough time to let the propagation happen. Develop and work on the server you will use as soon as possible using the staging tools you can use. There is always the trick to change the server’s IP locally by editing your Hosts file for testing purposes.

Please don’t hesitate to ask questions about WordPress, DNS, or web hosting.

Jos Velasco.

CC0 licensed photo by Aaron Jorbin from the WordPress Photo Directory.

Share and subscribe:


Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Jos Velasco

Subscribe now to keep reading and get access to the full archive.

Continue reading