Email forwarding and CNAME records

cname-recorddomain-name-systememailmx-record

I have a Heroku app and a domain that maps to it. The host records are set up as follows: Domain setup

Now I want email to admin@mydomain.com to be forwarded to my gmail account. I was told by the support for my domain name registrar that since I'm using CNAME records that's not possible as the MX records will be overridden by the CNAME records. Is that true? If so how can I work around it?

Best Answer

The naked domain cname problem is common. The dns specs do not allow you to redirect a naked domain. Because of this, many dns providers do not allow you to use a cname for @. Your dns providers way of making @ records use a CNAME must be interfering with other records.

Your workaround is as follows:

Google runs servers that do nothing but redirect naked domains to other domains (ie yourdomain.com to www.yourdomain.com) In your Google Apps control panel, go to Domain Settings -> Domain Name, and follow the instructions to redirect your naked domain to www.yourdomain.com. In your dns settings, have them keep your www record, but change the @ CNAME record to an A record: give them the ip addresses provided to you by Google in their instructions. Have them add Google's MX records and you're set.