A naked CNAME entry pointing to your S3 bucket example.com will override all MX records for your domain. The result is your email is sent to the wrong domain.
Don’t follow all the instructions from Amazon AWS S3 on how to host your static site on S3. These are the steps you should follow when creating your buckets:
- DO NOT create a bucket called example.com
- Only create a bucket called www.example.com
- Create an A record that points to 184.108.40.206. This is a free service provided by Wwwizer that will redirect example.com to www.example.com.
My solution introduces a dependency on Wwwizer. This is a risk I am willing to take. I don’t have any affiliation to Wwwizer whose main business appears to be “providing SSL for the cloud”. I have some domains with my current provider and didn’t want to move one to Route 53. I haven’t had any problems with my email since making this configuration.
Related PostsWhy Hugo Static Site Generator
Software Tools I Use and Recommend