[Update: Thanks to the help of a certain @shanselman my issue has been resolved. In the end it was my misunderstanding of the DNS config. I had an extra A record for *.domain.com that was not required. Once I removed that all works perfect without removing the CNAME entries]

The Problem:

I have recently migrated a whole bunch of sites to Azure Websites that I previously hosted on a virtual machine with memset.com in the UK.

The domains are using outlook.com for email using domains.live.com to register the custom domain names.

When hosted on the memset VM all worked fine.

Once the domains were migratedto Azure Websites though I found I couldno longer send email to those domains.

After heaps of testing I found that if I Telnet in to the actual mail server (4b54eb7050cd4ea6187d03d89cc37f.pamx1.hotmail.com) I can send emails from user@somedomain.com to anotheruser@anotherdomain.com (both of which are hosted by outlook.com).

However, if I tried to send from my mail client (outlook in this case) from user@somedomain.com to anotheruser@anotherdomain.com I eventually got the following back:

Reporting-MTA: dns;bay0-omc1-s16.bay0.hotmail.com
Received-From-MTA: dns;BAY402-EAS185
Arrival-Date: Sat, 5 Apr 2014 00:49:04 -0700
Final-Recipient: rfc822;info@alpaka-appenzell.ch
Action: delayed
Status: 4.4.7
Will-Retry-Until: Mon, 7 Apr 2014 00:48:41 -0700

Doing an MX check on one of the domains not migrated to Azure Websites (that uses outlook.com for email) I foundit returned the correct hostname. For one of the sitesmigrated it was returning the CNAME entry, which of course was needed for validating the custom domain name of the site on Azure.


This was the DNS config that had been added which enabled the custom domain name on Azure Websites along with the Outlook.com config which had not changed.


The Solution:

After lots of trial and error, cursing, hair pulling and a sleepless night I finally managed to fix the issue…although I am not entirely comfortable with the solution.

The answer was to delete the CNAME entries from my DNS config.

Now this completely goes against what I was expecting as Azure Websites requires you to create those entries to validate your custom domain. However, you also need to create A records pointing to an IP address that Azure gives you.

It was only after I finally found this article on stackoverflow that I realised “Hang on, I have an IP address that has been given to me by Azure so surely I no longer need those CNAME entries!”

So delete them I did from my DNS config BUT left them on the ‘Manage Custom Domains’ screen on Azure.


Now to some maybe that seems obvious that you should (and can) delete the CNAME entries once the custom domain is validated. It certainly wasn’t to me and I suspect a lot of others.