Redirect a Subdomain to Route 53 from GoDaddy

Background: I’ve recently started working on a web application where the domain was purchased through GoDaddy.  Personally, I use Name.com, they’ve always had the functionality I needed and their interface is nice to look at. This post is about overcoming a specific challenge I had with GoDaddy so I could avoid using their DNS.

Scenario: With this web application, I’m currently building out our infrastructure to run web servers in multiple places (future blog posts will elaborate on that). To facilitate this, I’m testing out Route 53’s Latency-based routing which allows you to have one domain name that routes requests to the servers with the lowest latency. Very simply this means that requests from the UK go to Amazon’s EU-Ireland, requests from the US go to Amazon’s US-East data center.

In order to test that out though, I needed to start by testing out a subdomain. I couldn’t just use a new domain because I needed our SSL certificate. Turns out this isn’t very well documented and GoDaddy claims this isn’t even possible with their service, but its not only possible but pretty straightforward.

Step 1:

Let’s head over to your Amazon account. I’m going to assume you’re already using AWS, so I’ll skip the intro to that.  Under Compute & Networking, click Route 53.

route_53_empty_first_view

Step 2:

Click Create Hosted Zone. Here you will enter the subdomain you want to use. Our example uses subdomain.yourdomain.com.

add_domain_route_53

Step 3:

Once created, you will be presented with the following screen. If not, just click on the subdomain from the list on the right. Take note of the delegation set, that’s what we’ll be using in the following steps with GoDaddy.

delegation_set_for_subdomain

Step 4: 

Head over to GoDaddy and login. Click My Account -> Domains and open the Domain Details for the domain of the subdomain you want to redirect. You should see three tabs, click on the DNS Zone File tab.

GoDaddy Domain Details

 

Step 5: 

Click the Edit button. You’ll get popped over to the page where you can actually edit the DNS Zone File. Scroll to the very bottom and you should see the NS (Nameserver) section, which is what you want.

You will need to do the following for each of the records you got from Route 53, the four URLs under Delegation set.

Click Quick Add and enter the subdomain under Host and the DNS URL under Points To. You should add a total of four records.

adding_godaddy_dns_to_route_53

Once you’ve added each of the DNS records from the Delegation Set, just save your records in the DNS Zone File and within an hour or so your subdomain should be propagated and sending requests through Route53.

Step 6:

Now head back over to Route 53 so we can actually send your requests somewhere.  Another blog post will cover setting up latency based routing, but let’s just point it to a load balancer for now via an alias.

In Route 53, click the hosted zone you created.

record_set_view_route_53

Click Create Record Set. Switch Alias to Yes, and from the target list select the AWS Resource you want to point it to. The name field appears to be optional, but feel free to use it.

point_your_record_set_route_53

If you have an Elastic IP you’d like to use instead, don’t use Alias and add the IP address to the record set list.

Add Record Set instead of Alias

 

And that’s it! You should now have a subdomain routed by Route53. More posts to come on the things you can do with the open-ended configurability options you gain with Route53.

5 thoughts on “Redirect a Subdomain to Route 53 from GoDaddy

  1. Great tutorial and very straight forward. i have another questions if i have an application running on port say 8069 . to access it i have to enter subdomain.mydomain.com:8069 but i would like some just to enter subdomain.mydomain.com to access the application, is this possible with route 53? thanks

Leave a Reply

Your email address will not be published. Required fields are marked *