image

I wanted to write this blog post explaining how it is possible to use Azure Traffic Manager with your apex domain name. I’ve googled solutions for this and haven’t found any until now. 

Azure Traffic Manager currently does not support Apex or “Root” “@” domain names. Meaning, you cannot use it with https://example.com. This is because Traffic Manager provides you with a CNAME “wwwexamplecom.trafficmanager.net” and DNS RFCs forbid the use of a CNAME record as the domain apex record.

This is where Cloudflare comes in.

Cloudflare supports a feature called CNAME Flattening that they have developed in-house for their DNS servers. You can use Cloudflare to host your domain for free and you aren’t required to use their caching/proxying service.

After creating a Cloudflare account and adding your domain, you can use a CNAME record as your domain apex “@”. Behind the scenes, Cloudflare is translating “wwwexamplecom.trafficmanager.net” to an IP and returning the IP when “example.com” is queried.

image

I hope this helps anyone looking to use Azure Traffic Manager.