Traffic Manager and CNAME

199 views Asked by At

The company has decided to implement geo-located multi-region solution. The Traffic Manager Geo was selected to route the traffic between regions. But there is some issue.

The previous solution based on one region, domain format subdomain.domain.com. The A record in DNS pointed to public IP of the Load Balancer. Also there is MX record, which is required for mail flow for @subdomain.domain.com.

Traffic Manager requires to have CNAME, I can't use A record anymore. At the same time, the DNS provider declines to have both CNAME and MX, because it's against of DNS standard. I didn't know about this limitation till yesterday.

The first idea came to mine mind: migrate to the email from different domain. The service owner is declines it, but probably he will accept it, if no other options available.

Does anyone have any idea how to fix the problem? I mean how to use Traffic Manager without breaking mailflow?

Best regards, Dmitry

Configured CNAME record, which points to FQDN of the Traffic Manager. It works, but mail flow is not, because MX record has been removed.

1

There are 1 answers

1
Sourav On

Created traffic manager profile with Geographic routing:

enter image description here

To achieve this scenario, you can create a CNAME record for tm.subdomain.domain.com that points to the Traffic Manager endpoint:

enter image description here

Enter the Traffic Manager endpoint FQDN (for instance, mytrafficmanager.trafficmanager.net) in the “Value” field. Traffic Manager Geo will be able to route traffic to the appropriate region based on the user’s location after the CNAME record has been created.

Now, create a A record and a mx record for subdomain.domain.com that point to the load balancer’s public IP address. Using Traffic Manager Geo in this manner will allow you to redirect traffic between regions without affecting mail.

enter image description here

If the DNS provider is unable to support both CNAME and MX records use different DNS provider for traffic manager while keeping the main domain’s DNS configuration with the existing provider. You can delegate the subdomain used for the Traffic Manager to this different DNS provider.

Reference:

Tutorial: Configure geographic traffic routing with Azure Traffic Manager | Microsoft Learn