Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question

1 Answer 1

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).
share|improve this answer
    
I've done this but it seems to not work all the time : it was working yesterday evening, but this morning when I go to www.mydomain.com or mydomain.com, the browser shows a dns error...<br/> but mydomain.cloudapp.net is reached, so it seems to be a pb with the dns mapping. may be sometimes one record overwrite the second one ? it is very weird –  tahir Jun 22 '11 at 9:57
    
more precisely, I have a 105 error sometimes –  tahir Jun 22 '11 at 10:13
    
That sounds like you either have a problem with your local DNS servers, or the DNS server that is authoritative for your domain. –  Kyle Smith Jun 22 '11 at 14:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.