Change DNS settings in your Domain Name Provider

Log into the website where you registered your domain name. Ther should be a section to change your DNS settings. Look for a section that contains the nameservers. It should have two or more fields that look something like this:

ns1.example.com
ns2.example.com

The numbers and domain name will differ, but it will usually always begin with ns. We will be changing these, so click whatever is needed to edit the contents of these fields. Delete whatever values were already in there. Now we will replace each of them with the addressed we got from Amazon Route 53. Please note the following things:

  • If your domain name register has less entries than the number of addresses you got from Amazon, then just select any of the addresses you like, there is no need to use all of them.
  • If the addresses we copied from Amazon Route 53 contained a full-stop at the very end, then delete that full-stop when entering it into these fields (but do not delete them from Amazon Route 53).

Once you have edited and saved these changes, it is just a matter of waiting. It might take several hours (or even a few days) for these changes to take effect.

You can monitor if the changes have occured using the command line tool dig (which should be installed by default on an ubuntu machine). Type:

dig example.com

And if you see the new NS addresses that you entered, then it is ready. Otherwise keep waiting.

When it is ready, you can access your EC2 server using you new domain name :)

Hope this tutorial was helpful.