1

Hi I've been trying to find an answer to this, but can't seem to.

Basically I have a domain name (registered at Namecheap) that (CNAME) points to an AWS S3 bucket endpoint/url (i.e S3-hosted static-only website), e.g coolname.com.s3-website-us-east-1.amazonaws.com.

I'm trying to setup email for this domain, and obviously since S3 has no "backend" one can configure, it's purely static-file hosting, I have to use a third-party email provider/host. So I created the needed MX records for the 3rd-party email provider but they are not being validated.

I am no DNS expert, but from my research it looks like if the naked domain is a CNAME record, it renders the MX or TXT records invisible? Thus, preventing email from working.

However, the AWS S3 documentation walks you thru a setup (step #9) that uses the Route53 console to magically point a domain's A record to a S3 website bucket endpoints -without actually needing to supply the IP address.

So I'm not sure how to get the S3 endpoint IP address that I need to point my domain to. Any help is appreciated!

Edit1: Further research indicates that the solution might be to use ALIAS records, if the DNS provider allows. Looks like namecheap does.

  • "it looks like if the naked domain is a CNAME record" that never happens because a CNAME can not be put at apex per its definition. – Patrick Mevzek Jan 23 at 14:37
1

Patrick's comment is correct: A CNAME entry at the apex of the domain is not allowed. Some DNS systems let you put one there anyway. For web sites, this mostly seems to work, but it breaks mail. When you have a CNAME at the apex, mail doesn't get delivered to your MX records, rather it gets delivered to the MX records for the domain in the CNAME.

To fix the problem you just need to replace the CNAME with an A or ALIAS record. Since most AWS services can change IP address without warning, Amazon requires CNAME or ALIAS records.

So, yes, you can use ALIAS records at NameCheap instead of CNAME and it will solve your problem. Here are instructions for doing so.

If your DNS host didn't support ALIAS records, you would need to use one that did. For example you could still use your same domain registrar, but change your DNS host to Amazon Route 53. The instructions for that would be:

  1. In your AWS console open "Route 53".
  2. Add a domain for DNS there.
  3. Replicate all your A, CNAME, and TXT records there, except change the CNAME records to A records that use an alias.
  4. Note the NS values that route 53 gives you and change the NS records at your domain registrar to those values.
| improve this answer | |
  • I didn't want to change my nameservers to use Route 53 though, that can take forever to propagate. To ended up setting an ALIAS record on Namecheap's DNS settings and mail is working correctly now. For some reason I thought A records == ALIAS records. But they are not the same. – unknownprotocol Jan 23 at 21:29
  • Glad it works. I put in the extra information in case somebody has the same problem but doesn't use a DNS host that support ALIAS records. Most DNS hosts don't support them. – Stephen Ostermiller Jan 23 at 21:30
  • 1
    ALIAS records are a hybrid of A and CNAME records. From the outside they look like A records. Clients get an A record with an IP address. From the inside they look more like CNAMErecords where you specify another host name. The DNS server does the lookup on that host name periodically (usually every few minutes) and serves an A record with the IP address for the host name. They are not a standard thing supported by all DNS hosts. They are sometimes also called ANAME records. – Stephen Ostermiller Jan 23 at 21:32
  • Thanks Stephen, yeah learned something new... makes sense though. – unknownprotocol Jan 23 at 21:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.