How to setup AWS Route53 Alias and CNAME

12,376

Using Route 53, setting up DNS records for your EIP isn't any different than for a regular one.

For your records - you need to set up an A record that points to example.com. Keep in mind that Route 53 will not allow you to have a CNAME record pointing to your root domain (example.com). Another caveat is that, once you create a CNAME record for your subdomain, you cannot associate ay additional records with it. For example, you couldn't use mail.example.com as a CNAME record for your email portal, as well as an MX record.

If you just want to set up www.example.com, and have it point to your EIP, just set up an A record pointing to example.com, and configure a CNAME record to point to www.example.com. Here's what my console looks like:

Example

Note - make sure there aren't any forbidden characters in your string. Sometimes the console will throw an error saying that it cannot add that type of record - usually its because you have copy & pasted, and there's a space in there or some other invisible character.

Share:
12,376

Related videos on Youtube

DatsunBing
Author by

DatsunBing

Updated on September 18, 2022

Comments

  • DatsunBing
    DatsunBing over 1 year

    I am experimenting with my newly written application on EC2. At the moment it is hosted on a particular EC2 instance, however I am sure that before I go live I will want to move it to another server, one that's larger or configured differently. For this reason, I have associated an EIP with it.

    Route53 is my DNS provider and it has the default SOA and NS records setup fine (and my registrar is pointing to these). Now I need to tell the DNS about my EIP, however that's where I run in to trouble.

    As far as I know, I should be able to setup an A record that points from mydomain.org to the EIP. When I put in the EIP address, however, it won't allow it. Based on some sites I have done in the past, I think I can put the private DNS name in here, but I don't want to do that since it's associated with a particular instance, and I'll be changing instances in the future. What am I missing?

    Also, I will want to setup the subdomain www.mydomain.org. As far as I know that means a CNAME record. Correct?

    • Michael Hampton
      Michael Hampton over 10 years
      Aside: Save yourself a lot of headaches later, and set up a VPC for your instance(s) now.