Wednesday, December 31, 2014

How to transfer your DNS configuration to AWS Route 53

These are the steps for a simple DNS migration to AWS Route 53.

For our convenience, we have previously migrated our Internet Domain registration to Route 53 using these instructions (optional).

1- Create Hosted Zone

- On the Route 53 Console, click on "Create Hosted Zone" button.

- Enter your domain name ( in this example) and press "Create" button.


After a successful creation, the Zone Details will appear on screen and also the Name Servers for our domain. They will play an important role later on.

2- Obtain Zone File

There are three ways to populate our Hosted Zone: Route 53 API, Console and Import Zone File:
  1. Importing a zone using API is for advanced users and is suggested for big DNS configurations. There are some tools out there to facilitate this task (Official documentation).
  2. Importing a zone manually using Route 53 Console is easy but only for small DNS configurations.
  3. Importing a zone using "Import Zone File" option on the Route 53 console is easy but relies on our ability to obtain the list of your current DNS server configuration.
A DNS Zone File is a plain text list of your current DNS configuration with all records and their values.

Import Zone File is the method we are going to use in this example. It ensures that no typos are introduced in the migration process and is a easy repeatable method.

Here below my DNS server configuration obtained from my current ISP using a Plesk Control Panel. There are all sorts of Control Panels and Service Providers. I suggest you to send a support request to your current ISP to get that information.

Zone file:

$TTL 1h
* CNAME CNAME      A      MX (10)      MX (20)      TXT v=spf1 a mx ~all  CNAME CNAME CNAME CNAME A  CNAME CNAME CNAME CNAME CNAME

The file format is simple: Three columns with DNS entry name + entry type + values separated by spaces.

Notice the two special fields at the beginning of the list: $ORIGIN and $TTL. I had to introduce them manually.

$ORIGIN is our Internet Domain Name followed by "."

$TTL 1h is the default TTL we plan to use for each entry. You can easily change that value later for individual entries using the console where necessary.

No SOA or NS records: They have to be deleted from our list. They are already present in the Hosted Zone configuration.

3- Import Zone File

- Select the newly created Zone and click on "Go to Records Sets" button.

- Click on "Import Zone File" button and Paste the contents of your Zone File.


- Press "Import" button.


You will get a successful message after a couple of seconds. Otherwise, the console will tell you what was the error and on which line number was produced.

3- Test

The new Hosted Zone and their DNS entries are ready to use.

This is a concept that could be difficult to wrap our head around it: Route 53 is replicating all those changes in realtime across our DNS servers and this configuration is ready to use by anyone.

But, we haven't changed our Internet Domain configuration and therefore no one is connecting to our new DNS servers. That gives us a chance to properly test the transfer result before going Live.

Where are my new DNS servers?

Open your Hosted Zone using Route 53 console. Your new DNS servers for are under the Type: NS.


Use dig command to query your "old" and your "new" DNS servers and compare the result.

First, lets send the request to Internet to get our current Live configuration:

$ dig

; <<>> DiG 9.8.3-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46712
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

; IN A


In this example the DNS query was "" and the answer is IP

Next we perform the same query but this time we instruct dig to ask only to one of our new DNS servers (previously obtained from the Console):

$ dig

; <<>> DiG 9.8.3-P1 <<>>
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64064
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 4, ADDITIONAL: 0
;; WARNING: recursion requested but not available

; IN A


;; AUTHORITY SECTION: 172800 IN NS 172800 IN NS 172800 IN NS 172800 IN NS

The answer is a bit different but the key value, the IP address, is the same. That indicates that this DNS entry has been successfully transferred.

Also notice that the TTL is 59 seconds in the first query and 3600 seconds (1h) in the second query. That is because we have specified $TTL 1h in our Zone File and all the imported entries in Route 53 have this default value. You could change it on each entry manually using the Console or repeat the import process again with a different default TTL value.

4- Rollback plan before changing Live configuration

On the next step we will change our Internet Domain DNS configuration and tell Internet to use our new DNS servers. Before doing that it is suggested to lower our NS entry TTL to 1 hour.

- Access to your Hosted Zone, select the NS entry for your domain and click on the 1h Hour button (the value will be translated to 3600 seconds) and click on "Save Record Set" button.


This instructs other DNS servers connecting to ours to come back an hour later in order to find out if the Route 53 DNS servers are still valid. This give us the option to undo this configuration in the case something goes wrong. In the worst case scenario, the issue will last an hour (the TTL value).

5- Change Internet Domain configuration and bring Route 53 Live

This is the step where all the previous configuration is set in motion.

- Access to Route 53 Registered Domains, select the Internet Domain we plan to modify and click on "Add/Edit Name Servers".


- Write down the current DNS servers list in order to rollback this change if necessary.

- Introduce your new DNS servers obtained on step #3 (These shown here below are and example. Your servers names will probably differ) and click on the "Update" button.



A couple of minutes later (depending on the TTL set up on your former DNS servers) the change can be tested using dig.

$ dig NS

; <<>> DiG 9.8.3-P1 <<>> NS
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 29759
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 0


;; ANSWER SECTION: 3600 IN NS 3600 IN NS 3600 IN NS 3600 IN NS

The new Route 53 servers are there and being used by anyone connection to our Internet Domain.

6- Post configuration tasks

Once we are happy and with everything tested we could bring up the TTL values. A higher TTL will improve our users experience and reduce Route 53 cost.

- Access to the NS entry and click twice on the "1d button" to select 172800 seconds (2 days).


7- Rollback

In case something went wrong we could set our former DNS servers in the Internet Domain configuration. Repeat step #5 but this time select your old DNS server list. This will bring your DNS configuration to the initial point once the TTL expires (1 hour in this example).


  1. Thank you for your valuable content , Easy to understand and follow. As said, the migration to cloud is very essential for the protection of the database.

    Cloud Migration services
    Aws Cloud Migration services
    Azure Cloud Migration services
    Vmware Cloud Migration services
    Database Migration services

    1. Great Article Cloud Computing Projects

      Networking Projects

      Final Year Projects for CSE

      JavaScript Training in Chennai

      JavaScript Training in Chennai

      The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. I am definitely enjoying your website. You definitely have some great insight and great stories.
    Windows VPS Hosting India

  3. Thank you for sharing your thoughts and knowledge on this topic.
    Amazon Web Services Online Training

  4. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
    AWS Online Training
    AWS Certification Training
    AWS Certification Course Online
    AWS Training
    AWS Online Course

  5. Am really impressed about this blog because this blog is very easy to learn and understand clearly.This blog is very useful for the college students and researchers to take a good notes in good manner,I gained many unknown information.

    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

  6. Online football betting i99club, one of the world's leading online gambling sites, provides the best prices in football betting เว็บแทงบอล

    Ufabet1688 online betting website UEFA Bet is a 100% legal website with all licenses. ufabet

    UEFA football betting, casino, slots, lottery, direct website 1688, stable financial, 100% UFABET168. ufa

    Fan wreath shop with free delivery, with pictures before-after sending with receipt. พวงหรีด

    Sticking to the COVID-19 situation: โควิด

    Online Baccarat FOXZ24 Easy to apply, fast, deposit-withdraw 10 seconds with the system. บาคาร่า

  7. FOXZ88.NET online casino website Global standard 2020-2021. คาสิโนออนไลน์

    Betting online gambling reminiscent of UFASCR.COM Baccarat. ufabet

    UFABET football betting website, the big brother of all UEFA networks, UFADNA, with an update The first modern system in 2021. ufa

    Web football i99PRO online lottery casino apply today for free 5000 bonus. เว็บบอล

    Kardinal Stick Siam - Relx a great promotion. Express delivery in 3 hours. relx

    Online Marketing Company By the way we can make your website. Reach more customers directly to your business group. Grow your sales. SEO


  8. Hello there! I simply wish to offer you a major approval for your incredible data you have here on this post. I will be returning to your site for all the more soon.

    best interiors

  9. HIGS offers complete research assistance for our clients across the globe. We provide end-to-end PhD research assistance for our clients across all domains with the help of top-notch research experts.

  10. Most molders work with two parameters for establishing second-stage strain. Choose from millions of attainable combinations Hand Held Deep Tissue Massagers of supplies, finishes, tolerances, markings, and certifications on your order. To see these design-for-manufacturing suggestions intimately, view our Injection Molding Design Guide. Ribs must be 40-60% the thickness of outer walls and may nonetheless maintain draft. Reduce undercuts, which is able to} increase the complexity and value of the device ejection mechanisms, by including in pass-thru coring.