Azure – 1&1 hosting + azure cname + google apps mx

applicationazurecname-recorddomain-name-systemgoogle

I have a problem while hosting my website on azure :
I need to have an url mydomain.com, when deploying in azure it gives the url mydomain.cloudapp.net, so I do a cname record from mydomain.com to map with mydomain.cloudapp.net.

But I also have set up mx records for mydomain.com to google mail servers in order to have emails like myname@mydomain.com, and the cname record drops these mx records… Then I try to do the following :
1) keep mx records for mydomain.com and give up with the cname record here
2) create a subdomain www.mydomain.com and do a cname to map this subdomain to mydomain.cloudapp.net
3) do a redirect from mydomain.com to www.mydomain.com
then I could keep my pretty mails and have a pretty url for my azure website.
BUT it seems to not work with 1&1 hosting, I can't map www subdomain to a cname.
Does anyone know if there is a workaround, or if I'm doing wrong ?

Best Answer

The issue is that you cannot have a CNAME record for a domain that has other record types. It's for this reason that you should never have a CNAME record for your root domain (mydomain.com).

It seems like you have the right answers:

  • Keep the MX record for mydomain.com pointed at Google.
  • CNAME alias your www record to mydomain.cloudapp.net.
  • Create a redirect from mydomain.com to www.mydomain.com (via .htaccess rewrite-rule, or a basic HTML redirect page hosted on mydomain.com).
Related Topic