TL;DR: 1) Be careful that the nameservers are up everywhere before you shut down the old system (wait 48h) 2) Check if your MX records are correct (mail still working?)
Migrating Nameservers and DNS is always tricky. It’s not instant, so it could look fine on your computer but be completely broken somewhere else. So how can you do it safely? Here’s a few easy steps to follow to minimise your risks during the migration, illustrated for the case of
GoDaddy => AWS Route 53
This means, we’ll assume you currently have a Production-App registered with GoDaddy, but you want to migrate to AWS Route 53, e.g. because you already have your servers there. We’ll also assume our domain name is “examples.com” (because with example.com I couldn’t do all the steps).
0) Dummy setup
Depending on how important it is to you that everything runs 100% smoothly, you might first want to do the entire process with a dummy domain. You’d spend 12$ on any domain your heart desires, set up some DNS, and then do all the following steps and see if all runs smoothly. This is a very time-consuming process, so I’d only recommend if it’s the end of the world if something goes wrong during the process.
1) Setup the system on the target (AWS)
This step you can always do without impacting anything in production. Make sure you can access your system directly with it’s IP and that it’s running smoothly.
If you’re running with a AWS load balancer, you almost have to setup SSL with AWS Certificate Manager since it’s free and easy. But how can you check if it’s working or not? Since you’d like to check yourproductiondomain.com, which is still with the other registrar, it’s going to be hard to check.
HTTP VS HTTPS
Make sure that the page is accessible via http and https. On some systems you might get forwarded automatically to https, on others not. You can use http://downforeveryoneorjustme.com/ to check if a page is down on http. NOTE that the default AWS loadbalancer security settings don’t open port 80!!! You need to set that manually:
2) Download the Zone Info from GoDaddy
There’s an option to download the zone information in GoDaddy.
3) Import the Zone Info into AWS Route 53
There’s function to import the zone file in AWS Route 53.
BE EXTREMELY CAREFUL HERE
The import somehow messes up the MX entries! The MX entries in my zone file were:
@ 3600 IN MX 5 ALT1.ASPMX.L.GOOGLE.COM @ 3600 IN MX 5 ALT2.ASPMX.L.GOOGLE.COM @ 3600 IN MX 10 ALT3.ASPMX.L.GOOGLE.COM @ 3600 IN MX 10 ALT4.ASPMX.L.GOOGLE
But AWS decided to import it as:
HOW NICE OF THEM, THEY ADD RANDOM STUFF AT THE END… Seriously guys, wtf?
You need to correct the MX records, in case you wish to receive your mails after the migration!!!
In case you don’t use an external provider (i.e. you’re using GoDaddy email), make sure you setup the new MX records first!
Anyways, check your entries entry by entry to make sure they are set correctly.
The only one that you might want to differ is the examples.com. root level entry because you might want to point it to an ALIAS of your AWS LoadBalancer. The loadbalancer doesn’t allow IP’s in the first place, so this might even be a necessary switch (and why you migrated away from GoDaddy?).
Anyways, now we’re entering the
4) Set the new Name Servers in GoDaddy
The AWS Route 53 will tell you what the new name servers are:
Delete the old ones from GoDaddy and insert the new ones. But before this, ask yourself again:
- Is my new system (if any) up and running?
- Are the MX Records correct?
- Did I setup the SSL correctly?
After changing, the traffic will slowly starting to go through the new name servers.
BUT BE AWARE: Even though it goes to through the new name servers on your machine, doesn’t mean it goes through the new name servers everywhere!!!
The only way to make sure all traffic goes through the new name-servers, is to wait 48 hours.
So then you do this. Wait 48 hours. What you can do meanwhile is:
CHECK YOUR EMAILS. ARE THEY STILL WORKING?
Run for example an MX check here http://mxtoolbox.com/ to check if the E-Mails via the new DNS are working.
5) Do the transfer (48h later, or with the old system still running)
To do so, unlock your domain name first at GoDaddy. They’ll provide you with an authorization code to put into AWS route 53. Now all you have to do is request the transfer and accept it through the email they send you.
And that’s it. That’s how you migrate domains .