问题原文
原帖链接 · unknownprotocol · CC BY-SA 4.0
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.
已采纳解答
原帖链接 · Stephen Ostermiller · CC BY-SA 4.0
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:
- In your AWS console open "Route 53".
- Add a domain for DNS there.
- Replicate all your
A,CNAME, andTXTrecords there, except change theCNAMErecords toArecords that use an alias. - Note the
NSvalues that route 53 gives you and change the NS records at your domain registrar to those values.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
