Azure traffic manager cname - azure

Hi I have too webapps in 2 different regions
webapp1.azurewebsites.net
webapp2.azurewebsites.net
webapp1.azurewebsites.net has a custom domain name (www.myrealdomainname.com) associated with it and is mapped via A Record on my providers dns record.
I have also added a cname record to webapp1.azurewebsites.net like this - www.myrealdomainname.com to mywebapp.trafficmanager.net
My question is when I visit www.myrealdomainname.com it doesnt go through traffic manager. Why is this? The dashboard on the portal shows nothing.
Also if I disable webapp1.azurewebsites.net leaving only webapp2.azurewebsites.net, and visit www.myrealdomainname.com it shows me content from webapp1.azurewebsites.net - again it doesnt go through traffic manager.
Is this because of the A record?

That is most likely the case. I do not understand why you have some DNS records pointing directly at one of the apps anyway if you are using Traffic Manager. Just point all records to Traffic Manager and configure it to distribute your traffic as you need.
Here is a link to the documentation: https://azure.microsoft.com/en-us/documentation/articles/web-sites-traffic-manager-custom-domain-name/
A quote from there: "When your website is configured as a Traffic Manager endpoint, you will use the .trafficmanager.net address when creating DNS records. You can only use CNAME records with Traffic Manager"

Related

Configure Azure Traffic Manager over 2 web apps with custom domain and SSL

Background
I have two websites:
- web1.azurewebsites.net
- web2.azurewebsites.net
I have added a traffic manager called webtm.trafficmanager.net.
web1.azurewebsites.net is configured with a custom domain web.example.com. I've also added a wildcard SSL certificate to it (i.e., *.example.com). If I request web.example.com it serves the website without any issues.
Requirement
I need to setup Traffic Manager on top of these two sites. So, if web1.azurewebsites.net is down/offline, then Traffic Manager can switch to web2.azurewebsites.net automatically.
Implementation question
I've read these SO answers (SO 1, SO 2) and this docs article, however, I have some doubts. I would really appreciate if someone can confirm my understanding outlined below, please?
Step 1: I understand that I'll have to update DNS records to something like: web.example.com. 60 IN CNAME webtm.trafficmanager.net.. Remove other DNS/CNAME records that point web.example.com to web1.azurewebsites.net.
Step 2: I'll need to remove the current custom domain mapping from web1.azurewebsites.net and then re-add it. Set custom domain to web.example.com and the CNAME configuration will show the traffic manager endpoint. No DNS changes required in this step?
Step 3: Add a custom domain to web2.azurewebsites.net set the custom domain to web.example.com and the CNAME configuration will show the traffic manager endpoint. No DNS changes required in this step?
Step 4: No changes to the SSL certificate added to web1.azurewebsites.net.
Step 5: Add the SSL certificate to web2.azurewebsites.net.
Now, accessing https://web.example.com should hit the traffic manager. It will see that web1.azurewebsites.net is online, so it will direct users to that. If web1.azurewebsites.net goes down, it will auto redirect users to web2.azurewebsites.net.
Thanks!
Your steps are mostly correct. What you want to do is to follow this document---Configure a custom domain name in Azure App Service with Traffic Manager integration
In step 3 and step 4, the traffic manager domain name will show under CNAME configuration. Select it and click Add custom domain. No other steps are required.
If a record is already in use and you need to preemptively bind your
apps to it, you can create an additional CNAME record. For example, to
preemptively bind www.contoso.com to your app, create a CNAME record
from awverify.www to contoso.trafficmanager.net. You can then add
www.contoso.com to your app without the need to change the www
CNAME record. For more information, see Migrate an active DNS name to
Azure App Service.
You also could see the full steps in this blog. In this blog, it uses a second web app in a different subscription, so it selects an external endpoint for that. If your first web app and your Traffic Manager instance are in the same subscription, use an Azure Endpoint, as you would normally, and choose the web app in that subscription.
Let me know if you face any questions.

How to change the DNS Zone nameserver in Azure?

How do I change the nameserver in a Microsoft Azure DNS Zone to be something else? I'd like to use Cloudflare for my nameservers instead of the default Azure ones.
As far as I know, you can not change Microsoft azure DNS name server. Azure DNS is a hosting service for DNS domains that provides name resolution by using Microsoft Azure infrastructure. But Azure DNS supports co-hosting domains with other DNS services.
To set up co-hosting, modify the NS records for the domain to point to the name servers of both providers. Read here.
For example, you can add name servers from Cloudflare in the additional name servers in the NS record on the Azure portal.
The Name Server (NS) update are done on the domain registrar side. In 'Azure DNS', Microsoft just manages the domain they are not the registrar.
If you want Cloud Flare to manage your domain the NS record needs to be change on the domain registrar side.
If you bought an Azure App Service Domain, you get a DNS Zone (mine didn't work properly, and that's how I got to my solution). You also get a second resource from the domain itself (the App Service Domain resource). If you there click on the tab Advanced Management portal you will be redirected to a different site. From there you can go to the DNS tab at the top, select Manage Zones and fill in the domain you want to control.
From there, scroll down, and you'll see something like this.
As you can see, there are two nameservers. Those nameservers point to Azures DNS system. But here, you can actually change the nameservers.

Cloudflare Setup with Azure WebApp

I have a domain name registered with GoDaddy, e.g., "mysite.com", and have followed the Azure instructions to map that domain's CNAME and A records to my Azure WebApp, i.e.,
I then updated GoDaddy's nameservers to point to cloudflare so cloudflare is now in charge of my DNS records, i.e.,
Within cloudflare I have SSL set to Full and the certificate appears to be active
and my DNS records in cloudflare pointing to my azurewebsites domain name, i.e.,
It has been over 36 hours since I updated the nameservers, but as you can see from cloudflares DNS records screenshot above (see Status), all traffic appears to be routing around cloudflare directly to Azure, i.e., I'm not hitting cloudflare. Putting domain mysite.azurewebsites.net in whatsmydns also shows everything pointing to Azure.
What have I missed in the setup to ensure all traffic routes through cloudflare?
Probably a little late but you need to click on that grey cloud icon in Cloudflares settings. The icon will then go orange and the traffic will be routed through Cloudflare.
CloudFlare appears to transparently replace all CNAME records to A, so this CNAME record is not visible for Azure. You have to change nameservers of your domain to its original ones (provided by GoDaddy in your case), add CNAME through GoDaddy DNS panel, wait for Azure to see it, approve domain in Azure, and only then migrate to CloudFlare.

Why won't root domains in Azure Traffic Manager load balance or fail over?

Simply put:
I have a domain called erik.com, two azure websites (east and west), and one traffic manager that is setup to manage the two azure websites.
When I take east offline (by throwing a non-2** status code) erik.com goes offline. This should not be the case! Right?
However, when I add a sub domain to the two azure websites (www.erik.com) then it works! I take one or the other offline and the traffic manager resolves to the available website.
I'm hearing/reading things that tell me that Traffic manager doesn't work with root domains like that... Say what?! Why?
As explained in the FAQs at https://azure.microsoft.com/en-us/documentation/articles/traffic-manager-how-traffic-manager-works/#faq , Traffic Manager does not support 'naked' / apex domain names.
*Can I use Traffic Manager with a ‘naked’ (www-less) domain name?
Not currently.
The DNS CNAME record type is used to create a mapping from one DNS name to another name. As explained in the Traffic Manager example, Traffic Manager requires a DNS CNAME record to map the vanity DNS name (e.g. www.contoso.com) to the Traffic Manager profile DNS name (e.g. contoso.trafficmanager.net). In addition the Traffic Manager profile itself returns a second DNS CNAME to indicate which endpoint the client should connect to.
The DNS standards do not permit CNAMEs to co-exist with other DNS records of the same type. Since the apex (or root) of a DNS zone always contains two pre-existing DNS records (the SOA and the authoritative NS records), this means a CNAME record cannot be created at the zone apex without violating the DNS standards.
To work around this issue, we recommend that services using a naked (www-less) domain that want to use Traffic Manager should use an HTTP re-direct to direct traffic from the naked domain to a different URL, which can then use Traffic Manager. For example, the naked domain ‘contoso.com’ can re-direct users to ‘www.contoso.com’ which can then use Traffic Manager.
Full support for naked domains in Traffic Manager is tracked in our feature backlog. If you are interested in this feature please register your support by voting for it on our community feedback site.*

Azure custom domain name with NetworkSolutions DNS

I'm having trouble setting up my domain purchased from networksolutions.com to azurewebsites.net or cloudapp.net.
Here are some of the resources I'm using, so far with no success. The instructions are varied and I also suspect that network solutions does not allow for the correct settings.
Has any body set up successfully with network solutions?
Configure custom domain name
Custom DNS website
!!UPDATE!!
Thanks to the answer.. here are the CORRECT NetworkSolution DNS settings to get you plugged into azurewebsites.net
Azure settings...
You need to edit the DNS Zone file. Check this link and this link.
The exact steps to setup a Custom Domain is as follows
Go to DNS Zone file and add a CNAME for domains like www.example.com or mysite.example.com. Add a DNS Record ( C-Record ) - "www" : "mygreateazuresite.azurewebsites.net"
Then come to Azure portal, in the Custom Domain Option, put the complete URL [ www.example.com ]
The process to set up custom domain for both Azure Websites and Azure Cloud Services are very similar
I have Found a nice step by step tutorial (azure web app + network solutions), same steps but a bit more detailed (including a simple tool to check your domain settings):
http://loldemar.azurewebsites.net/custom-domain-name-in-azure-using-network-solutions/
Basic steps:
Go to azure web app, go to configure tab, and choose manage domains, from there copy the IP address that is bellow this message (Help for IP Address THE IP ADDRESS TO USE WHEN YOU CONFIGURE A RECORDS)
Go to network solutions (advanced DNS Settings) in your Add IPAddress on your IP Address A Records (#).
The go to cname records and add
awverify.yoursitenamehere.net 7200 awverify.yourazuresitename.azurewebsites.net.
awverify.www.yoursitenamehere.net 7200 awverify.yourazuresitename.azurewebsites.net.
www.yoursitenamehere.net 7200 yourazuresitename.azurewebsites.net.
Now go back to azure, click again manage domains, and add your domain names (yoursitename.net and www.yoursitename.net)

Resources