we have a problem when using mx and cname records. The reason we are using a cname record is that our virtual machines are hosted on Windows Azure and so they've dynamic ips.

We have the following setup:

customer.tld -> (CNAME) -> host.our-hosting-domain.tld -> (A/MX) Windows Azure

The reason we are using A/MX records at our configuration even if Azure has dynamic ips is that we need an mx record for incoming emails. These A/MX records are updated by a script on the server every 60 minutes.

The problem is the following: if i send an email to info@customer.tld it automatically changes the recipient address to info@host.our-hosting-domain.tld which is obviously the CNAME record.

An alternative would be of course to point the A/MX records directly from the domain to azure by using A/MX-Records, but then we would have to register all customer domains on our own (because we need the login credentials of the domain registry for our script).

Is there any way to prevent this? Or is this by CNAME-design?


closed as off-topic by EEAA, Ward, mdpc, kasperd, Jenny D Apr 7 '15 at 7:38

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    The recipient will not be rewritten by any proper SMTP implementation. Please describe your setup and testing in detail. – sebix Apr 6 '15 at 19:29
  • 2
    Your example appears to be too abstracted or otherwise misguided. Apex level CNAMEs (example.com. CNAME) are not legal. To avoid a long, protracted discussion about your configuration, we need the name of the real record that is being aliased. – Andrew B Apr 6 '15 at 19:48

1) You can reserve ip addresses on Azure using powershell or the preview portal (both requires ip to be reserved prior vm creation. Can't be made after it was already deployed.)


2) You must create A records not CNAMES.

10.3. MX and NS records

The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias.


3) You should be able to setup your smtp server to use any domain name. To successfully deliver e-mails you have to properly setup dns entries.

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