AWS Route 53 DNS not resolving to subdomain

5,447

CNAME records must always point to another domain name, never directly to an IP address.

Share:
5,447

Related videos on Youtube

brianlmerritt
Author by

brianlmerritt

Sometimes you can solve at least one of the world's problems with a bit of coding and bit of thought, but usually not in that order...

Updated on September 18, 2022

Comments

  • brianlmerritt
    brianlmerritt over 1 year

    My DNS domain for numeet.com (just a spare domain) was pointed to Route 53, and resolution of numeet.com and www.numeet.com is working fine.

    However, a subdomain called learn.numeet.com is not working, despite a CNAME.

    The main A record points to an elastic load balancer where a couple of servers are dealing with web traffic (once SSL is terminated on the ELB)

    The CNAME resolves to a specific IP address of one of the above servers (the only one that has Moodle installed). That server has a vhost setup and an elastic IP address to the subnet on the server and HTTP is fully open (and already working with the ELB).

    However, when 2 days after setting this up I try to got to http://learn.numeet.com, the DNS still does not resolve.

    On the EC2 instance, I can run dig learn.numeet.com, and that resolves to the IP address fine. However, even from the EC2 server, ping learn.numeet.com doesn't work.

    The record setup is as per the photo below: enter image description here

    Is there a problem with Route 53 having multiple routes to the server (www.numeet.com via ELB and learn.numeet.com via Elastic IP) ?

    What am I missing?

  • Michael - sqlbot
    Michael - sqlbot over 8 years
    The actual problem was that a CNAME can never have a literal IP address as its explicit target. That's never a valid configuration. A CNAME record, by definition, must return the canonical name of the host, while an A record must return the ipv4 address of the host.
  • brianlmerritt
    brianlmerritt over 8 years
    As I discovered! However Amazon does allow me to set one using Route 53, with the net effect that a dig learn.numeet.com did return the ip address when nothing else would.