DEV Community

Cover image for How to Transfer a Domain Name with Zero Downtime
Nick Janetakis
Nick Janetakis

Posted on • Originally published at nickjanetakis.com

How to Transfer a Domain Name with Zero Downtime

This article was originally posted on October 9th 2018 at: https://nickjanetakis.com/blog/how-to-transfer-a-domain-name-with-zero-downtime


In a previous article I talked about moving some of my domains from internet.bs to Namesilo.

That article talked about why I made the move and how I was going to transfer my main domain name (nickjanetakis.com) once it was about to expire. That time has come.

This article will go over how I transferred my domain name with zero downtime which was very important to me because my entire business depends on that domain resolving.

Not only for serving this blog, but it's also where my course platform is hosted from on a separate sub-domain.

The Zero Downtime Strategy

In order to get zero downtime in a reliable way you'll want to change your DNS records to use your hosting provider's nameservers. If that's not possible, you could also use your new registrar's nameservers if they allow you to set up your DNS records and use their nameservers before the transfer completes.

1. I recommend using your hosting provider's nameservers:

For example Digital Ocean offers free DNS hosting and DNS record management. I use them for all of my sites.

The general idea is you could create DNS records for your domain on your hosting provider's site about 48 hours before you decide you want to transfer your domain name. That will give ample time for DNS servers around the world to catch up.

At the same time you'll have duplicate DNS records on your old registrar, but you'll update your domain's nameservers to point to your hosting provider. After about 48 hours all requests will go through your hosting provider's nameservers.

Now are you are in a great position and are ready to proceed with transferring your domain.

2. If that's not possible then use your new registrar's nameservers:

Some domain registrars like Namesilo are really cool about this. They will let you use their nameservers and pre configure your DNS records before your transfer is complete. We'll talk more about this pre-configuration step later.

If your new registrar doesn't offer that, then consider looking into using a better registrar!

At this point you should do one of the above steps. Once complete, you'll be ready to continue onwards and go through with the domain transfer.

The Domain Transfer Process

There's a few things you need to do on both the old and new registrar.

Steps to Take on Your OLD Registrar (Part 1)

  1. Make sure the email address on your WHOIS contact details is up to date. Go check it out and make sure you can receive email from the address you have on file.

  2. Optionally disable WHOIS privacy. Some registrars will transfer domains with it enabled, so double check with them. If you do keep WHOIS privacy enabled then make sure you can accept emails from the private email address.

  3. Get your EEP auth code from your registrar's dashboard. It's likely going to be an option under your domain's management section. It's a string of characters.

  4. In your domain management dashboard unlock the domain.

Steps to Take on Your NEW Registrar

  1. Find the transfer domain option on your new registrar. Here's the link for Namesilo since I happen to use them.

  2. Enter in your domain name to transfer, followed by the EEP auth code from the old registrar whenever they prompt you for it.

  3. You should receive an email at your WHOIS contact email address where you'll be expected to click a link to initiate the transfer.

Does your new registrar allow you to pre-configure anything?

For example Namesilo will let you pre-configure a few things about your domain to be transferred before it's been transferred. This is a really handy feature!

When it comes to transferring DNS records, here's the options they allow:

  • Make no changes to your DNS records, in which case it will use your current DNS records as soon as the transfer is complete. If you're using your hosting provider's nameservers this is what you'll want to do.

  • They will attempt to clone and import your old registrar's DNS records and set them up for you while also giving you the option to double check and modify everything. If you're using your new registrar's nameservers you'll want to set this up.

  • Auto-forward (301 redirect) the domain to another domain name.

  • Set up a domain parking page.

They also let you enable or disable WHOIS privacy and edit your WHOIS contact details.

When the domain transfer is complete all of these settings will take place immediately!

Steps to Take on Your OLD Registrar (Part 2)

Now that you've initiated the transfer it's up to them to accept it. You have a couple of options here. You could do nothing and wait and this could take anywhere from a few minutes to 7 days depending on how user friendly your old registrar is.

A list of outcomes for your domain transfer:
  • In the absolute worst case scenario the request will be rejected and your domain transfer will fail. You'll have to contact your old registrar and ask them why.

  • In the 2nd to worst case scenario it will take 7 days for the transfer to go through without any user intervention on your part because your old registrar ignored the request (this is the default behavior to auto-transfer after 7 days).

  • In a nearly best case scenario you could send them a support email asking if they could accept the transfer because its state is currently "Pending at Registry" which means it's waiting for them to accept your transfer request.

  • In the best case scenario you'll go AFK for a few minutes and by the time you're back it'll be complete.

When your old registrar accepts the transfer you'll get a transfer confirmation from your old registrar, new registrar or both registrars. It really depends on who you're using.

If you're curious, the entire process took about 3 hours when I moved this domain name from internet.bs to Namesilo. I went with the approach of contacting internet.bs' support to let them know the domain was ready to be transferred and after a few friendly back and forth e-mails it was all done.

When It's Done

You'll want to double check everything on your new registrar to make sure your name servers are pointing to the correct place, you have WHOIS privacy enabled (if available) and that you set up any e-mail forwarding addresses you may have had on your old registrar.

When it comes to e-mail forwarding you'll want to update your DNS records to use your new registrar's MX records instead of your old registrar's MX records.

Did you transfer your domain? Let me know how it went below!

Top comments (5)

Collapse
 
nickjj profile image
Nick Janetakis • Edited

I usually upon migrating do edit /etc/hosts (in Unix cases), adding the new IP address and domain.tld to check whether everything's working as expected — before switching the nameservers or DNS entries.

You don't need to edit your /etc/hosts file for that and you can't trust it anyways because it's isolated to just your machine before your DNS servers are even used.

But you can run dig domain.tld or dig @8.8.8.8 domain.tld if you want to test it with another DNS server besides your own (such as Google's).

That ~48 hour wait period is just a safe number to make sure DNS servers around the world update their records.

 
nickjj profile image
Nick Janetakis • Edited

That's the whole point to locally test whether the website is working as expected, before changing the global DNS variables.

/etc/hosts is only used to resolve host names locally on your machine before it contacts your DNS server so editing your /etc/hosts file doesn't really help test anything in the context of seeing if your public DNS records are updated.

That's why you can add something like 127.0.1.1 google.com to your /etc/hosts and now google.com resolves to a loopback address instead of the real google.com page (for your machine only). It's because your configured DNS servers haven't even been contacted yet to resolve that hostname.

Collapse
 
lboix profile image
Lucien Boix • Edited

Very good article Nick : this is a great sum-up of the transfer process!
If I can suggest an add : it's important to assume that the existing DNS records could be overwritten by the default ones from the new registrar. All records does not follow the transfer automatically : I saw it a lot of time.
That's why I always advice people before launching the transfer : copy paste the existing DNS records configuration somewhere (if you have only a few entries) for backup purpose (before add them to the new registrar) or simply download the DNS zone file on the old registrar, keep this backup, and use this file to recreate DNS records on the new one.
In both cases : you can skip SOA and NS records of course as you are precisely moving to a new registrar.

That way you are sure to not lose anything :)

 
nickjj profile image
Nick Janetakis

Those are all worthy tests but they don't have anything to do with changing your domain registrar or nameservers. Your domain name will still be the same after you transfer it. The only differences are a different company now handles registering your domain, and potentially hosting your DNS records too.

Collapse
 
phlash profile image
Phil Ashby

Thanks @nickjanetakis, an excellent walk through and a good example of separation of concerns - owning a domain name is separate from hosting the DNS for it (and of course separate again from any services associated with the domain).