Skip to content

Route53 - DNS - hosted zones

Created: 2016-02-22 09:39:16 -0800 Modified: 2019-02-12 17:17:17 -0800

Setting up a hosted zone is one of the few things on AWS that is not pro-rated. It costs 50¢ per month (plus tax).

So this isn’t actually just a Route53 problem… my setup is like this:

  1. The registrar of points to Route53’s nameservers
  2. Route53 has an A record for “”
  3. CloudFront only allowed traffic from “”, not “

To fix this, I edited my CloudFront distribution’s general settings so that Alternate Domain Names (CNAMEs) included both and

Just make CNAME record for “www” in your hosted zone that points to “”.

You can always use a public hosted zone and have it point at internal DNS addresses, e.g. —> Everyone will have access to the DNS record (“”), but it will point to an address on their own network. There are two issues with using a public hosted zone in this way:

  • PCI-compliance - if you’re ever going to handle payment data, then you need to have a private hosted zone.
  • People will know which internal IP addresses you use, so if they get access to one endpoint, they’ll know the addresses of your other endpoints.

In order to set these up, you go to Route53 —> Hosted Zones —> create. The big thing to keep in mind is your domain’s name servers. For example, I registered through, so I needed to sign into and adjust my nameservers so that they were referring to Amazon’s nameservers. After making this change, you need to wait about 5-10 minutes for it to propagate. You can check the progress of this propagation using sites like this:


  • When making the change to nameservers, any subdomains you have will stop working. You need to make AWS handle this.
  • If you’re pointing at a shared host, you’ll need to go into CPanel and either add an addon domain or a parked domain (AKA an “Alias” in CPanel). I added an addon domain and then used the CPanel “Redirects” feature to point it at another domain (note: I needed Leaf to give me permission for an addon domain).

Using Route53 to point to a subdomain on another host

Section titled Using Route53 to point to a subdomain on another host

I have Route53 managing, and I wanted to point to First, I set up on my shared host (via CPanel) to have a subdomain pointing at public_html/botland/wiki. Then, in Route53, I made an A record that points at the same IP address as To test this out before waiting for DNS to propagate, I simply added this to my hosts file and it immediately worked:

A private hosted zone is a set of DNS records for internal traffic only, meaning you don’t even need to own the domain name that you’re setting up DNS for.

Setting it up:

  • Leave the TTL of NS (name servers) and SOA (start of authority) set to whatever they are.
  • Change the TTL of any A records you create to 0 so that no caching takes place.
  • Update your VCP so that these are enabled:
    • enableDnsHostnames
    • enableDnsSupport
    • Note: as of 2/22/2016, they’re called “DNS resolution” and “DNS hostnames” in the UI.
  • Test that you set it up correctly by SSHing into a machine, running nslookup, and then typing your A record’s name (e.g. to make sure that it resolves to the correct IP address. You don’t actually need