amazon-web-servicessubdomainamazon-route53

AWS deleted sub-domain then re-added, now inaccessible


I have a primary domain which points to an EC2 instance which works fine. I setup a sub-domain via this article. I pointed this sub-domain to the same ec2 instance which then served different resources via Apache2.

I wanted to try something out, the something being not using a second hosting zone for the sub domain. So I deleted the sub domains hosted zone and removed the related name records from the primary domains record set.

I did my little experiment, which didn't work. I once again removed all of the name records related to the sub domain from the primary domains hosted zone. I then followed the same article to re-setup the sub-domain. I added the new name service records to the primary domains hosted zone.

Now here's the problem. When I test the sub-domains records, they are all fine. When I test the primary domains name server records for the sub-domain, it responds with NOERROR but it also does not point to the EC2 instance. If I try to navigate to the sub-domain via the browser, a "server DNS address could not be found" is returned. Yet, when I run a tool like DNS Lookup, the correct name servers are resolved.

What am I missing here?

Additional information:

The name servers in the sub domain look like this:

name: blog.quotr.ca
ns-1028.awsdns-00.org.
ns-253.awsdns-31.com.
ns-1778.awsdns-30.co.uk.
ns-576.awsdns-08.net.

The primary domains hosted zone entry for the sub-domain looks like this:

name: blog.quotr.ca
ns-1028.awsdns-00.org.
ns-253.awsdns-31.com.
ns-1778.awsdns-30.co.uk.
ns-576.awsdns-08.net.

Please note, navigation to the primary domain quotr.ca is still accessible (albeit locked down to my ip currently).


Solution

  • The subdomain uses the same name server as the primary domain. The NS records are against the domain in Route 53.

    Then just create the sub-domains within the same Hosted Zone.