The domain name system (DNS) is part of the unseen critical infrastructure of the Web. It's something that end users won't be aware of until a DNS lookup fails, rendering a domain name inaccessible. Any change you make to your DNS server must therefore be done with the utmost care - or else you risk keeping any and all traffic from reaching your clients’ websites.
Transferring DNS from one server to another may seem like a daunting process, but it’s simpler than you might think. The main difficulty is planning and documenting the migration so that the execution happens smoothly, minimising downtime and protecting your data. Here’s our simple guide on how to change from one DNS server to another, all without negatively affecting your website.
What is DNS?
Simply put, DNS is an interpreter between the language we use to browse to different websites or resources, and the language computers use to find them.
Simply put, DNS is an interpreter between the language we use to browse to different websites or resources, and the language computers use to find them. The hostnames we type into our Web browsers (e.g. www.nimbushosting.co.uk) are helpful shorthand for humans, but not something that’s easily parsed by computers. Instead, they need to be translated into the resource’s IP address, a string of unique numbers and punctuation that will be unintuitive and unfriendly for human users to think about (e.g. 22.214.171.124).
This process of accessing a domain name usually involves four DNS servers:
- Recursive resolver – a server provided by a user’s ISP or by public providers such as Google, which interprets requests for online resources, and acts as a go-between with other servers. This is the DNS server you may be familiar with when changing settings in your operating system.
- Root nameserver – a server which provides the recursive resolver with the correct top level domain (TLD) server address for their request (e.g. records for .com addresses).
- TLD server – a server which provides the resolver with the address of the nameserver for the domain the user wants to browse to.
- Domain nameserver – a server which provides the resolver with the precise address for the requested domain.
All four servers are invoked every time a user or application needs to access a resource online. As such, reducing any barriers to this process is extremely important. DNS providers also offer a number of different security features that can protect sites from malicious queries, such as DNSSEC, load balancing and firewalls. These can be key motivations for moving to a new DNS server – and a demonstration of why it’s so important that no part of this process fails.
Website migrations, made simple.Our skilled support team will handle your website migrations – so you can focus on the bigger things.
Transferring DNS from one server to another
Transferring your DNS from one server to another happens in two key phases: planning and execution. The planning phase is critical to ensure that all of your data is backed up and accounted for, and that the switchover happens smoothly. It’s also important to use this phase to contact all of the relevant parties, and establish that your new DNS provider can accommodate all of the features you require.
1 Check your DNS requirements
Before you initiate the transfer process, it’s important to know exactly what it is that you want, and whether it is possible. If you’re changing to a managed DNS provider for your website, for instance, you’ll need to ensure that your hosting provider actually allows you to use an external DNS. With this assurance, you can touch base with your planned DNS provider, and explore the DNS packages they offer, including security or redundancy features such as DNS Failover.
You will also need to consider exactly what it is that you are transferring, and the DNS requirements of your site or applications. Factors such as the number of queries fielded by your current DNS, the types of records you’re using, and the security and redirect features you require will all need to be supported and replicated – and potentially extended, depending on your plans. Your managed DNS provider will help to ensure that these requirements are met, and may provide tools and support to help with the transition.
2 Prepare your DNS zone files
If you have multiple domains or subdomains, it’s likely that their records are contained in multiple different DNS zones. These zones are represented by plain text files stored on the DNS server. Replicating these zone files on the new DNS server is crucial to maintaining accurate records, and ensuring a seamless DNS server transfer. As such, it’s important that you login to your current DNS provider and export these in the right format for your new server (usually BIND). If this isn’t possible, copy and paste them into a plain text file using a utility such as Notepad++.
Many DNS providers can complete these DNS zone transfers – commonly known as AXFR – for you. This is the ideal way to transfer DNS zones, as it reduces the capacity for errors, particularly when you aren’t able to accurately export your zone files. It’s always worth enquiring with both your current and prospective DNS provider to see if they can manage this part of the process for you. Most DNS providers will at the very least offer a DNS zone import tool, so you shouldn’t have to manually recreate the files, which can be a tricky process.
3 Synchronise your records
Once your DNS zones have been successfully transferred, you should ideally freeze any further changes to your current DNS records. This will ensure that the records on your old and new DNS servers don’t fall out of sync with one another before the new server goes live. Alternatively, you may choose to track the changes that happen between transferring your records and switching over to the new DNS server, and applying these changes later on.
4 Change your SOA and NS records
A DNS server relies on two key components: the SOA (start of authority) and NS (nameserver) records. SOA records store important information on each zone which is required to meet DNS standards, including the email address of the zone administrator, as well as basic technical information used by the server. NS records define the authoritative server for a domain, pointing visitors to the domain nameserver (and thereby allowing them to browse the website).
These records will have been transferred during the zone transfer process, but will need to be updated to reflect the new server details. This will include changing to the new provider’s nameservers, which you should be informed of by your new DNS provider. They may also be able to assist you with aspects of this process, such as any records that need to be changed to reflect features of the new server, and the different ways it might operate.
5 Check your records
You need to make absolutely sure that all of your records match the old ones, and that everything is correctly configured for the new server. Your new DNS provider may have simple comparison testing tools that can compare the records on your old DNS server with your new one. Otherwise, this will be a manual process of checking each record using commands such as dig, or the older nslookup.
6 Initiate the migration
When you’ve checked and double checked all of your records, you can finally arrange the migration process. Letting your new DNS provider know about this will allow them to prepare, and make resources available to you to ease the transition. This commonly includes running final checks on your DNS to ensure it will work correctly, and providing engineer support.
7 Update your domain registrar.
The final step in changing the DNS server for a website is to update the nameservers assigned by your domain registrar. Login to your registrar’s portal, and follow the process of managing your domain to find the option to change your DNS nameservers. This will differ depending on the registrar, but they’ll usually have a support page to help you find it.
Once here, it’s a simple matter of removing the old nameservers and pasting in the new ones from your new DNS provider. Once updated, this typically takes a few hours to propagate across the internet, though in extreme cases it can be up to three days. Tools such as dnschecker.org can help you to identify when this process has been completed.
A new server, stress-free
DNS migration can be stressful because of the potential for small mistakes to lead to a full site blackout. By following the simple steps above, however – and most importantly checking and double checking your work – you can ensure a smooth and successful migration that makes the most of the benefits offered by your new DNS provider.