I've just created a new website via azure's web app. I've done this several times before and never had a problem but now for some reason the site's DNS won't resolve!? Not even the custom domain but azure's own subdomain won't even resolve and the IP address 404's leading me to think this is an azure problem and nothing to do with my google DNS configuration for my custom domain I'm trying to setup. (golftipsters.com)
I even tried deleting and recreating the web app and app service. Got a new IP address but still the same problem. I deployed the site via continuous integration from bitbucket but even before that there should be some kind of placeholder?
https://www.golftipsters.azurewebsites.net/
http://20.40.202.16/
What's going on!?
It says my deployment is successful and active
Update:
After some trial an error creating new web apps. I've discovered that it's when I deploy my code via CI from bitbucket that this issue occurs. How could my code deployment cause the DNS to fail? Is it even the DNS then??
So it turns out the problem was in the codebase I was trying to deploy. I had this code in the global.asax.cs that was trying to force www. and this was causing the DNS error.
if (!Request.Url.Host.StartsWith("www") && !Request.Url.IsLoopback)
{
UriBuilder builder = new UriBuilder(Request.Url);
builder.Host = "www." + Request.Url.Host;
Response.StatusCode = 301;
Response.AddHeader("Location", builder.ToString());
Response.End();
}
Related
I'm trying to access my app, hosted on azure.
I've a finished c# solution. When I commit changes to Azure DevOps it triggers a (working & successful) build-pipeline.
It runs tests, publishes an artifact & testresults.
In my ServicePlan status is Ready and I see Data Exchanges on DataIn & DataOut graphs.
The Deployment Center:
Bu when I click the https://mywebsite.azurewebsites.net, No webpage was found for the web address.
I have Some basic Azure DevOps expierence, but this Azure Portal is something else :)
My basic questions would be:
Why is it not working?
Do I need a second pipeline, only for release? Or can I recycle the build pipeline?
Do I need some kind of deployment slots? Before I select a not-free slot, I want to know if this is necessary
What else could I be missing?
(My Azure resources include a sql-server, a sql-db, the actual appservice & a app service plan)
Thanks!
If you deploy web app to Azure and login https://<app-name>.azurewebsites.net, then the page still shows Microsoft page instead you owner page. You need check the default document, please ensure that the default page is listed in here.
Steps: login azure portal->App Service->configuration->Default documents
In Azure Web Apps, the default document is the web page that is displayed at the root URL for a website. The first matching file in the list is used. Refer File structure on azure to know more about the files and directories on Azure Web App.
Update1
When I go to the azurewebsites.net url I get a 404: No webpage was found for the web address.
Check this doc:
If you receive an HTTP 404 (Not Found) error when you browse to the URL of your custom domain, verify that your domain resolves to your app's IP address by using WhatsmyDNS.net. If not, it might be because of one of the following reasons:
The custom domain configured is missing an A record or a CNAME
record.
The browser client has cached the old IP address of your domain.
Clear the cache, and test DNS resolution again. On a Windows machine,
you clear the cache with ipconfig /flushdns.
Update2
the URL in my appservice is Azure-generated right?
Yes, then app service url is generated by Azure.
With making a new app service and going to the URL I do get a message app service is up and running.Time to take the next step and deploy your code.
And now, we should get this page, we need create new service connection and re-configure build and release pipeline and deploy your app.
Note: We need use the same user account and AAD domain to do this.
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.
I have a domain {x} hosted by Lws and a web app hosted by Microsoft Azure. I managed to import the domain {x} in Microsoft Azure by adding the required DNS records A and CNAME in Lws, and I also imported an SSL certificate successfully.
So my domain {x} is correctly configured and can be accessed with the url https://{x}. But if I type www.{x} in my web browser, I'm getting an error from Microsoft Azure: "Error 404 - Web app not found.".
I tried to add the domain 'www.{x}' in addition to the domain '{x}' in the Azure portal but it didn't fix the problem.
Do you have any ideas on how to fix this error with the url www.{x}?
Finally, I just had to wait to fix my problem, adding the domain 'www.{x}' in addition to the domain '{x}' in the Azure portal was the solution, but it was only effective after several hours (or maybe it was due to the cache of my browser).
I thought I had all my mappings perfectly done:
I'm able to add the www.mydomain.me to azure but not mydomain.me. Is there something I'm missing?
Edit: When I attempt to point to mydomain.me in my broswer, I get the following error message:
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.
2. The web app owner has moved the web app to a different region, but the DNS cache is still directing to the old IP Address that was used in the previous region. Click here to read more.
Thanks
It's hard to tell what's wrong since you've hidden the settings. Here's what should work:
A Record points to the IP address found on the Azure portal
CName awverify points to awverify.yourservice.azurewebsites.net
CName www points to yourservice.azurewebsites.net
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.