In December 2014, we published a three-part series of articles on DNS. We explored the most commonly misunderstood topics related to the domain name system (DNS): registrars and name servers, zones and records, and record types. We wrote the series to help our readers understand how DNS records work and when to use specific record types. This article builds on that knowledge to help users manage DNS in specific scenarios. We highly recommend that you read these earlier articles if you are unfamiliar with DNS. You’ll get a lot more out of this article if you do.
We’ve received a number of questions from our customers about managing their DNS since we published that three-part series.. Specifically, several customers have inquired as to how the different topics covered in our series can be put together to accomplish certain tasks. In this post, we provide instructions for performing DNS changes when you are switching WordPress hosting providers. There are two common use cases for this scenario, each with its own steps to follow. In one use case, you manage your own DNS records. In the other, your old WordPress hosting provider manages your DNS records. We’ll describe the steps for both.
What to Do When You Manage Your Own DNS Records
When you manage your own DNS records, it’s up to you to configure those records to work with your new hosting provider. You typically make these changes in the administration console of the registrar where you bought your domain name. GoDaddy, Network Solutions, and NameCheap are just a few examples of registrars that offer domain names. In some instances your DNS records may be maintained by a third-party service like CloudFlare. If you are not sure where you maintain your DNS records, Pingdom offers a DNS tool to help you figure it out. Just enter your web address in the tool and hit the Test Now button. The tool will list the authoritative nameservers for your domain. You should visit that provider’s website to make your DNS changes. Before you make any changes, though, there are several important steps you should follow to ensure a smooth switch to your new hosting provider.
Migrate Your WordPress Site to Your New Hosting Provider and Test It
The first step in the process is to migrate your WordPress site (its database and files) to the new hosting provider. In most cases, you’ll operate a version of your website at both the old and new hosts for a time. This will give you the opportunity to test the new host’s servers and resolve any issues that come up. We recommend using our automated migration plugin to migrate your site. It’s easy to set up, and also provides an ongoing backup of your website if things should go awry.
All of this assumes, of course, that you have a way to access your new WordPress site before your DNS changes take effect. Most reputable WordPress hosting providers offer a way of doing this. Pressable, for example, provides a secondary web address to all of its customers. This lets them test and administer their WordPress site before their DNS changes take effect.
Institute a Content Freeze
After you’ve determined that your WordPress site runs smoothly on your new hosting provider, you’ll want to place a content freeze on your site. This involves stopping all posting, commenting, and purchasing activity on the old version of your site. This gives you time to copy your website’s latest posts, comments, and orders to your new hosting provider.
One option you may want to consider during this phase is presenting a special offer page to site visitors attempting to hit your WordPress site at your old hosting provider. This page might explain what is going on and offer visitors a special deal for the inconvenience of having to return at a later time. This technique can help minimize any loss of business due to switching to new WordPress hosting providers.
Migrate and Test Your WordPress Site One Final Time
Now that the content freeze is in place, you should migrate the latest changes from your old WordPress site to your new WordPress site one final time. Again, a tool like VaultPress makes this step easy and straightforward. Then test your site one final time to ensure that there are no problems.
Update Your DNS Record
The next step is to point any A records for your domain to the IP address of your new WordPress site. If you want your website to be accessible at both www.yourdomain.com and yourdomain.com, you’ll need to update each respective A record. At this point, you’re done with making changes to your DNS records.
Wait for Your DNS Changes to Take Effect
It will take some time for your DNS changes to take effect. This is due to a phenomenon known as DNS propagation. The term ‘DNS propagation’ is something of a misnomer. DNS does not propagate throughout the internet. Instead, it is cached by DNS servers. DNS servers and visitors’ operating systems alike take time to replace their cached records with new records. This delays the effect of your DNS changes. Your visitors will likely be able to see your website at its new IP address within a few hours, and possibly as soon as a few minutes. If you took the time to set up a special offer page on your old WordPress site, this shouldn’t impact your business too much.
Updating DNS When Your Old Hosting Provider Manages Your DNS
The above example assumed that you were managing your website’s DNS records yourself. But what should you do if you are switching WordPress hosting providers and your old host provider manages your website’s DNS records? In this scenario, you will need to change your nameserver (NS) records for your domain so that they point to the nameservers of your new hosting provider. This will allow your new hosting provider to set your domain’s A record(s) for you so that they point to your new IP address.
NS records are simple to change. Your domain’s NS records are maintained by the registrar where you bought your domain. This is always the case, even if you are hosting your DNS records somewhere else. So that’s where you’ll need to start. The exact process is determined by your particular registrar. Generally speaking it involves logging into your account at the registrar, locating your domain in their account management interface, and selecting the option to change your domain’s nameservers.
Your registrar will be able to provide you with specific information on how to change your nameservers. A quick Google search turns up relevant results for popular registrars like GoDaddy, Network Solutions, and Namecheap, as well as other registrars. As with DNS records, the most important consideration when updating your nameservers is to ensure that your website is operational at the new host/server before you change the records. This will ensure that your visitors don’t experience any downtime as a result of the update.
We hope that you’ve benefited from examining these two examples. As we mentioned, there are many other situations that would require you to update your website’s DNS records. We’ll cover most of these situations in future posts, as well as additional advanced concepts related to DNS. We hope that you walk away from the series feeling empowered instead of anxious. By the time you’re done, you’ll have a solid understanding of when and how to make DNS changes while keeping your site up and running well.