Microsoft Azure - Getting a 404 page using custom domain with my web app - azure

There's an issue with an Azure website I'm working on where I get an azure 404 page when trying to access my web app (set up with a custom domain) without www. (with www. the site works fine). NS lookup shows that when using the naked domain (infratecheng.com) the results are different than when looking up the full domain (www.infratecheng.com).
(source: cassey.org)
The custom domain has been set up as per the instructions on the azure portal.
I wonder if this is a problem with configuration within azure or is it a problem with my domain provider settings?
Many thanks

Most likely, the problem is that you only added www.infratecheng.com as a host name for your Azure Web App, but did not add infratecheng.com. So when Azure gets requests to infratecheng.com, it doesn't know about any site that can handle them, and returns a 404.

Related

How do I host a public static site as a web app?

I want the url www.example.com to display default.html
From this question I understand that the easiest way is still to create a web app.
[How not to do it]
I tried creating a solution in VS2017
File->New ->Project -> .Net Core -> Asp.Net Core Web Application-> Empty
Then I moved my static files into wwwroot and deployed
What do I need to change so that default.html will load when someone goes to the site?
At the moment if I remove the Program class I get a message
Severity Code Description Project File Line Suppression State
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point
which is understandable since it is a web application , how do I change it to be a static web site?
[A better way, create the app in Azure.]
Instead of the above method I created a new web app and followed the advise at this question to paste in index.html.
I can now go to the Azure url for the site and the correct content displays.
Next I need to get example.com to work.
I added the CName record for www in my DNS with the url for the site, and I also went to Custom Domains in Azure to add my domain name.
However I get the following error when I go to my site.
Error 404 - Web app not found.
The web app you have attempted to reach is not available in this Microsoft Azure App Service region. This could be due to one of several reasons:
1. The web app owner has registered a custom domain to point to the Microsoft Azure App Service, but has not yet configured Azure to recognize it. Click here to read more.
When an app owner wants to use a custom domain with a Microsoft Azure Web Apps web app, Azure needs to be configured to recognize the custom domain name, so that it can route the request to the appropriate server in the region. After registering the domain with a domain provider and configuring a DNS CNAME record to point to the app's Azurewebsites.net address (for example, contoso.azurewebsites.net), the web app owner also needs to go to the Azure Portal and configure the app for the new domain. Click here to learn more about configuring the custom domains for a web app.
I got it working in the end. I must have missed a step in the documentation

Azure domain configuration

I have an APP that was awarded the gorunning.pt domain. It happens that when I call the gorunning.pt domain without the www everything works, when I add the www http://www.gorunning.pt/ I receive the page 404 application not found.
I've already set the DNS CNAME for the application of IP , also tried the url gorunning.azurewebsites.net defined by Azure , created a type A registration.
This is expected. Your DNS configuration is correct. However the Azure Web App's front-end doesn't recognize the www sub-domain as it is not mapped in the portal.
You will also have to map the www.gorunning.pt to your web app gorunning.azurewebsites.net in the Azure Portal. :)
From the dig web interface, it seems the domain has mapped to the Azure web app. However it shows 404 not found. As I know your custom domain maps to an empty web site, so the easiest way is deleting your existed web site then custom domain to the new web site again. If you still encounter the same issue, please submit a ticket via the following screenshot.

Multi-tenant Azure dynamic wildcard CName

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

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