I have a domain example.com
. This is NOT taken from Route53. I hosted my website on S3. Mapped S3 bucket to Cloudfront, and CF URL to example.com
via CNAME. I, initially, had deleted the entry example.com
from MX records because we cannot have 2 same keys. Later, I realized, I've stopped receiving mail on my mail server. Now, I'm trying to add the MX records, but couldn't because of duplicate keys.
How can I solve this problem of supporting both MX records and CNAME with the same key?
Asked
Active
Viewed 33 times
-1

Praful Bagai
- 16,684
- 50
- 136
- 267
1 Answers
0
For anyone facing a similar problem, I first deleted my CNAME associated with Cloudfront, then added MX records, and finally added CNAME with CF again. Not sure how, but both MX and CNAME were now being added successfully. LOL.
Update:-
CNAME takes priority over MX records. So if you have the same value in CNAME and MX records, you'll stop receiving emails. So, as a solution, I added www
as a subdomain in my CNAME. I now route my users to www.example.com
. If any user browser to example.com
without www
as subdomain, I forward them to www.example.com
.

Praful Bagai
- 16,684
- 50
- 136
- 267