Multi-tenant Azure dynamic wildcard CName - azure

I am trying to create a multitenant Azure website which is a way for people to sign up and get their sub-domains. I have followed the instructions in here (http://www.stratospher.es/blog/post/wildcard-subdomains-in-windows-azure) and manage to get all *.mydomain.com CNAME to mydomain.azurewebsites.net according to (http://www.digwebinterface.com/)
Here is the problem
if I go to tenant1.mydomain.com I'll get the 404 server error. However if I log in to Azure and go to my website Manage custom domains and add the tenant1.mydomain.com then everything would work fine.
The idea behind the wildcard is I can add tenant pragmatically/dynamically. Is there anyway to automated this process or add a wildcard in the azure Manage custom domains. Is there any difference between app cloud service and website?
Thanks for your help
Update
I end up using cloud services instead of websites. You don't need to configure the custom domain names in the control panel anymore. Just simply point cname and your good to go.

Did you check out the use of Amazon Route 53 to configure the domain mapping in Azure, it seems that there are options.
Please refer the following links
Sub domain mapping in windows azure
Add custom Domain to azurewebsite

Related

azurewebsites.net was already mapped, but still apears

I followed exactly the description by Microsoft to map their web apps on one's own external domain. And the redirection is even correct.
But my purpose was to map mydaylivery.com to the mydayliveryop.azurewebsites.net, so that the mydayliveryop.azurewebsites.net is replaced by my mydaylivery.com domain. However, there is just a redirection, but no replacement.
In my azure portal under the web app dashboard and beside "URL" is also mydaylivery.com mentioned. But if you go on mydaylivery.com, you see that there is still the azurewebsites.net subdomain.
I have used dig web interface to check your dns. It seems that you don't configure the domain correctly. The article you provide is suitable for Azure cloud service not Azure web App. I would suggest you have a look at this article. Please note below part in the article:
To use an A record to map to your Azure app's IP address, you actually need to create both an A record and a TXT record.

Link Azure Website to Azure DNS for easy Custom Domains?

Right now to create a custom domain you have to setup a cname for verification, and then you have to setup your real record, and then you can finally after that go and add it to the site.
I'm doing this scripted with C# and that's tedious considering that we're hosting our DNS with Azure. I would have thought that I could have added an a record to Azure and then add it directly to the website automatically but I can't figure out how to do this.
Anyone have any suggestions on how I can skip the whole Cname creation stuff?
Thanks!
Did you purchase a custom domain through Azure Web Apps?
https://azure.microsoft.com/en-us/documentation/articles/custom-dns-web-site-buydomains-web-app/
If you did, then everything should get automatically setup properly.
If you didn't, then you'll need to do the work to set it all up yourself.

Allowing Users to Enter a Custom cname on Azure Websites

I have a multi-site application running on Azure Websites. When a user signs up, they pick a name for their application and they end up with "appname.coolapplication.com". Everything so far is working great within our own domain.
Our application needs to allow users to enter their own custom domain. For example, they want to view their application from "elsewhere.com" rather than "appname.coolapplication.com". How do I go about configuring Azure Websites to allow me to do this?
You don't. Per these instructions you instruct the customer to enter a CNAME record on their domain registrar for the Azure domain, and then it begins to work.
EDIT:
The CNAME only "just works" for Azure Cloud Apps. For Azure Websites, it turns out you must add the domain in the portal as well. I'd thus recommend switching your Azure Websites to Azure Cloud Apps to simplify the issue.
You can use the powershell api to add custom hostnames.
See this question for details: Add many domains to an azure web site

Azure wildcard subdomains

I have a reserved azure website and I've been following this article - http://www.stratospher.es/blog/post/wildcard-subdomains-in-windows-azure
I have added a wildcard cname record which points to mysite.azurewebsites.net
via the azure management portal --> manage domains. I have the added an entry into the domain names list:
test1.mysite.com
If i browse to this url it works perfectly. However, if then try test2.mysite.com I get a 404. If i was to add test2.mysite.com to the domain names list in azure then test2.mysite.com would then work.
What have I missed ?
I got a reply from the author of the article above. Basically when he wrote that Azure websites didnt exist, he was using the azure cloud app.
In Cloud apps if you want to use your own domain you just point it to whatever.cloudapp.net. Your not required to verifiy a 'custom' domain like you have to in azure websites.

Map custom domain (and wildcard sub-domains) to Azure Website

I've looked at all related posts in MSDN and stack overflow but still having difficulty finding a solution.
I am looking to map a domain and all sub-domains to my windows azure website. It is a reserved website instance. I am using Amazon Route 53 DNS manager and have mapped a wildcard CNAME to my azure sub domain, and created a redirect on the naked domain to the www. subdomain.
When I navigate to the naked root, the redirect kicks in and I'm brought to www..com, where I receive a 404 error from azure.
I know the wildcard CNAME is working. I've verified using MXToolbox. If I go to "Manage Domains" in the Azure web UI admin system, I can manually add "www..com" or any other subdomain (e.g. "helloworld..com"). Azure verifies it fine and after saving, I can pull up the website fine by navigating to that subdomain and my azure website loads.
Is there any way to add wild card subdomains without having to verify each one manually through the azure ui interface? My application is a SaaS that relies on custom user sub-domains to serve up their branded website and gain access to their account so I need any and all subdomains to map to my application.
Currently, wildcard domains are not supported as far as I know. At least on Windows Azure Web Sites. They are on the roadmap, but currently you'll have to rely on adding every domain manually.
See wildcard comment on "Configuring a custom domain name for a Windows Azure web site".
Another feature not yet available on Azure Web Sites is SSL using a vanity (your own) domain name. If you want full control of your site(s) you can use Azure Cloud Services instead of Web Sites. With Cloud Services you can provision certificates, domain names, and run multiple sites on the same instances using host header routing.
Anything you can do with IIS Management you can do with a cloud service.
You're a little closer to the metal compared to Azure Web Sites (but not as close as with a VM) and you get load balancing, scaling, caching, and other goodness. Visual Studio 2010/2012 has excellent deployment tooling. You will need to study up on Azure deployment projects from VS, bit it's not bad.

Resources