Search code examples
dnsdomain-nameamazon-route53

Pointing a domain to AWS Route 53


I am having difficulties getting my domain to point to my EC2 properly. I searched through a few third party guides online, and got slightly swamped in the official AWS documentation, but despite this I still cant get it to work.

Ive have Route 53 set up like this:

Type:  A
Value: ??.??.??.?? (IP address)

Type:  NS
Value: ns-1403.awsdns-47.org. 
       ns-1696.awsdns-20.co.uk. 
       ns-632.awsdns-15.net. 
       ns-431.awsdns-53.com.

Type:  SOA
Value: ns-431.awsdns-53.com. 
       awsdns-hostmaster.amazon.com

And on my domain host I have the DNS Records set up like this:

Hostname: www
Type:     NS
Value:    ns-1403.awsdns-47.org
          ns-1696.awsdns-20.co.uk
          ns-632.awsdns-15.net
          ns-431.awsdns-53.com

I think I am doing something fundamentally wrong. Firstly Im not sure if I got the Hostname part right on my DNS records. On the site it says .domain after the input box for the Hostname, which makes me think its a sub domain specifier. Am I right in thinking the @ symbol works for no subdomain? (i.e. domain.com instead of www.domain.com)

Secondly should I remove the NS record set from Route 53, as its already specified in the DNS Records on the domain host?

Many thanks


Solution

  • There are two missing pieces here: telling your registrar to use Route53 instead of their own NS servers, and telling Route53 about your EC2 instance.

    First, you need to set up your registrar. In this step you're telling the registrar to tell the global DNS system to look at Route53 for information about domain.com. Here's a quick tutorial for Namecheap and here's one for GoDaddy. Other registrars are similar, just google for YourRegistrarHere assign nameservers.

    Second, to tell Route53 about your EC2 instance you should set an A record for domain.com within Route53 pointing at the elastic IP address that your EC2 instance is assigned. You should also create another A record for www.domain.com pointing at the same IP.

    For your second question, as soon as you set up your registrar correctly the interface for creating records should just go away. You'll be managing all of your DNS records through Route53 instead.