How to redirect from an Azure sub-domain name? - azure

I have some HTML widgets hosted on an Azure website. I would like to move these to a different Azure website.
Unfortunately, the mobile apps that consume these widgets are referencing their Azure sub-domain name directly. Example: old_widgets_site.cloudapp.net
Now I would like to shut down the old location where the widgets are hosted and move over to a new Azure website. Example: new_widgets_site.cloudapp.net :)
Is there a way for me to shut down the old website while still supporting the older mobile apps? Or do I have to keep the old app alive so I can host some kind of URL redirect mechanism on it?
PS - I know it's much better to reference a "virtual" domain name and have that redirect to Azure using DNS CNAMEs and I will. My question is not about that, but about redirecting *.cloudapp.net sub-domains.

To my understanding there is no option within Azure Web Sites to configure a redirect from within the portal.
What you could do is keep the old Web Site active and replace the content with a URL redirect statement in the web.config file (See: http://www.iis.net/learn/extensions/url-rewrite-module/using-the-url-rewrite-module). Of course that does mean you need to keep the old Web Site active.
Maybe you want to submit this idea using the Azure Feedback Forums: http://feedback.azure.com/

Related

i need to redirect multiple domains to the same static web URL in azure in case of a full site down....can anyone advise

first off i want to thank you all for the amazing information on here, i have learnt so much!
so the issue i have is i need to create a static web page for when we have a whole site down, as we host general maintenance pages on word press.i need to have multiple domains redirected to this web site when this issue occurs. the way i was thinking of doing it , is create a storage account then add to a static website to that storage container. then place the web page in a CDN adding multiple domains. then adding a cname record in DNS pointing to that endpoint? would this work?
many thanks in advance
Unfortunately map multiple custom domains directly to storage accounts website is not currently supported
https://feedback.azure.com/forums/217298-storage/suggestions/955579-enable-multiple-custom-domains-for-storage-account
You can integrate a Storage Account static website with Azure CDN and map a custom domains.
https://learn.microsoft.com/en-us/azure/cdn/cdn-map-content-to-custom-domain?tabs=azure-dns%2Cazure-portal%2Cazure-portal-cleanup

domain settings in azure

i have a live web app on azure with settings
with several host-names assigned to the site as below
As a change of requirements , i want the domain.net to be the parent domain where the root directory of my app points to, and not domian.co.uk
basically as shown below
As this is a live website, i want to achieve this with minimum downtime.
As you have added more than one custom domains to your web app, all the domains can be used to access your website, even only one is shown in the overview page.
If you want to use only one custom domain, you can remove the others. Or you can set a redirect rule for other domains at the DNS.

Hosting a Blog and App on a single Azure Web Site?

I like the idea of using Azure to host a Wordpress Blog.
I currently have an Azure Website that I'd like to add a blog to. Ideally I can create another website for the blog, and then have blog.mysite.com always show the contents of myblog.azurewebsites.net. Would this be possible?
I can have my domain registrar forward/mask from blog.mysite.com, but if there's a way to do it without masking, any info on getting that done would be awesome.
When you create a web site, Windows Azure provides a friendly
subdomain on the azurewebsites.net domain so your users can access
your web site using a URL like http://.azurewebsites.net.
However, if you configure your web sites for Shared or Standard mode,
you can map your web site to your own domain name.
http://www.windowsazure.com/en-us/develop/net/common-tasks/custom-dns-web-site/

How to convert multiple web sites hosted on IIS to Azure web sites

I currently have a VPS with another provider. On that VPS, I have IIS running with multiple app pools and web sites. I would like to get out of the "server management business", so it would seem that Azure Web Sites (Reserved) would be a great fit. I'm able to get the Azure Web Sites set up, including the custom domain piece. The problem that I can't seem to figure out is how to get the same URLs and behavior that I currently have on my VPS.
For example, I have URLs that look like this right now:
www.foo.com/bar
www.foo.com/baz
wildcard.foo.com/bla
I can't find a way to mimic that in Azure.
Things I've thought of/tried:
Go with one Azure Web Site and have separate virtual directories/app pools in Azure, but googling tells me that isn't supported.
Create 3 Azure Web Sites, one for each of the above. The problem there as I see it is I would need to change to use bar.foo.com, baz.foo.com, and bla.foo.com/wildcard (i.e. lose wildcard subdomain mapping and rework things to have a custom route at the end).
Maybe have one Azure Web Site with a rewrite URL? The problem I think I'd run into there is that it all runs in one app pool, so deploying one piece will affect all 3, and obviously a fault in one app would impact the other 2.
Has anyone else gone down this path and solved it? If the answer is spin up a virtual server, I'll probably just stay where I'm at.
Considering www.foo.com/bar, www.foo.com/baz and wildcard.foo.com/bla are 3 independent web applications that share a domain (foo.com):
Create a Windows Azure Website for each web application. You don't necessarily need to assign custom domain names to them.
Create another, separate website and assign to it the *.foo.com domain using an A record. Refer to Configuring a custom domain name for a Windows Azure web site for instructions. As documented, "With an A record, you map a domain (e.g., contoso.com or www.contoso.com) or a wildcard domain (e.g., *.contoso.com) to the single public IP address of a deployment within a Windows Azure web site. The main benefit of this approach over using CNAMEs is that you can map root domains (e.g., contoso.com) and wildcard domains (e.g., *.contoso.com), in addition to subdomains (e.g., www.contoso.com)."
In this "master" website, set up URL redirection (possibly with status code 307 Temporary Redirect) so that requests go to the appropriate applications.
Alternatively, to avoid the delay of the additional request caused by the redirection, set up the "master" website as a reverse proxy that transparently forwards the request to the "inner" web application and sends the response back to the user.
As yet another alternative, use a custom DNS service to do the routing at the DNS layer.
This way, each web application is independent and you solve the issue of routing requests to the appropriate application.

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