Azure Traffic Manager routing to Azure Website configured as External Endpoint - azure-web-app-service

Here's what I did,
Created an Azure Website (http://myapp1.azurewebsites.net) in Standard tier
Configured Azure Traffic Manager and added endpoint as an Azure endpoint. Trafficmanager routes to the website. Nice!
Removed the endpoint and and added endpoint as an External endpoint. Trafficmanager routes to a 404 page. I provided the FQDN (Fully Qualified domain name) as myapp1.azurewebsites.net.
What is wrong with it? Doesn't Azure allow to have .azurewebsites.net sites to define as endpoint urls?
Endpoint details,
Status - Enabled
Monitor Status - Degraded
Type - External Endpoint
Complete error page details,
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.

When using a web site, the web site needs to know what domain name to expect in the 'host' header of the DNS request. This is the domain name the user types into their browser.
When you add a web site as an endpoint in Traffic Manager, the Traffic Manager domain name (e.g. mysite.trafficmanager.net) is automatically added as a custom domain name in your web site. And when you remove the web site endpoint, it is removed once again.
However, if you use the external endpoint type, this does not happen. Because the web site does not recognize the domain name in the host header, a 404 error is returned.
To make this work, you will need to put a vanity domain name in front of Traffic Manager using a CNAME, register the vanity domain name in your web site, and use the vanity domain name from your browser. (You cannot manually add the Traffic Manager domain name to the web site since you cannot complete the proof-of-ownership validation which web sites demand.)

External endpoint needs to be outside Azure website.

Related

Domain forwarding from Google Domain to Azure Web App Service not masking URL

I have an Azure hosted React website running on a Web App Service. Let's call it mywebsite.azurewebsites.net
I have now purchased the domain name through Google Domains. Let's call it www.mywebsite.com.
The redirect is working fine. I type in www.mywebsite.com and I can see my website. However in the URL bar I can still see the address mywebsite.azurewebsites.net. I clearly want to see my new domain name. Can anyone provide any insight as to why this is?
You need to map an existing custom DNS name to Azure App Service.
See more: Azure Tutorial

Azure app service - how do I whitelist an endpoint (not IP address)

I have Azure app service (Web API) and have restricted access to everyone and allowed access by Ipaddress using access restrictions (https://learn.microsoft.com/en-us/azure/app-service/app-service-ip-restrictions)
I want to allow a particular domain/endpoint access to the API doesn't matter which IP address they are coming from. Is there any way possible to do it.
Unfortunately, It's impossible to whitelist a particular domain/endpoint to the Azure app service using access restrictions as essentially the domain name will be resolved to a real IP address via DNS when the client access the web API in the Azure app service.
Not sure why you want to only allow a particular domain. Perhaps, you just want to map a custom domain to Azure App Service. Then you can access the web API using your multiple custom domain URLs.
Furthermore, optionally, you could apply an Application gateway in front of your web API, then you could access your backend web API using a custom domain URL or Application gateway URL. Application Gateway can make routing decisions based on additional attributes of an HTTP request, for example, URI path or host headers. Also, you could whitelist the Application gateway frontends in your app service access restrictions. See Configure App Service with Application Gateway for more details.
I hope it's helpful for you.

Web app not validating custom domain name

Steps I followed:
Created an web app (registration-ceus.azurewebsites.net)
Created a traffic manager profile, added web app as an endpoint (registrationtmp.trafficmanager.net) Traffic manager opens the web
app. Issue I face while adding custom domain. I have own a domain
(e.g myworkdomain.net)
I am trying to add subdomain to traffic manager profile (testregistration.myworkdomain.net).
testregistration.myworkdomain.net CNAME
registrationtmp.trafficmanager.net
Added CNAME for my web app:
awverify.testregistration.myworkdomain.net CNAME
awverify.testregistration.registration-ceus.azurewebsites.net
When trying to add the Custom domain awverify.testregistration.myworkdomain.net to my web app, web app
does not validate the domain name. It always gives option to Add
Hostname.
When I try to access testregistration.myworkdomain.net, gets 404 error.
The app service is in Standard tier. What step am I missing or doing wrong?

Azure WebApp Deleted and Domain is not accessable

Unfortunately I deleted my WebApp, A domain which was purchased through azure portal by following these steps
https://azure.microsoft.com/en-us/documentation/articles/custom-dns-web-site-buydomains-web-app/
Was attached with this webapp. Now that I don't have any access to domain's DNS, If I visit my domain it says
This page is parked free, courtesy of Azure
How I can get my domain back to me.
You haven't lost your domain, so there's no getting it back to you. The issue is that you deleted your web app, so Azure is providing a default landing page for your now-unused domain name.
If you create a new web app, and want to assign your domain name to it, you should be able to in the Custom Domains and SSL blade for that web app's configuration.
For example, here's the settings for one of my web apps. I'd see my purchased domain names under Managed Domains.

Nested Profiles in Azure Traffic Manager not working properly

I had created two Traffic manager profiles naming as Firstprofile, Secondprofile.Firstly Secondprofile configured with app service end point. Now Secondprofile added as Endpoint to Firstprofile (called nested profile) .While browsing the Firstprofile showing the error as follows "Error 404 - Web app not found"
The HTTP request you make to your Web App includes a 'Host' header containing the domain name used in the request. This must be recognized by the Web App. The standard Web App domain name (foo.azurewebsites.net) always works, any other domain names appear in the Web App's custom domains list.
When you add a Web App to Traffic Manager, the Traffic Manager profile's domain name (child.trafficmanager.net) is automatically added to the Web App's custom domains list. So far, so good.
There is a known issue in the Web App / Traffic Manager integration that when using nested Traffic Manager profiles, the domain name of the parent profile (parent.trafficmanager.net) is not added to the Web App custom domain list. This is why you're seeing 404 errors when trying to access the Web App via the parent profile.
As a workaround, you should configure a DNS record in a vanity domain (e.g. www.contoso.com) as a CNAME to parent.trafficmanager.net, and register the vanity domain name as a custom domain in your Web App. Access to the web app via the vanity domain should now work, and this will use the nested Traffic Manager profile as part of the DNS resolution.
Jonathan (Program Manager, Azure Traffic Manager)
The problem is exactly what Jonathan Tuliani mentioned, but there is an alternative solution.
You need to add the parent Traffic Manager profile's domain name to the Web App.
Just go to Custom Domains and SSL -> Bring external domain -> enter the domain name e.g. tmdemo.trafficmanager.net. It will get allowed and everything works.
I just wrote a blog post about it: Nested Traffic Manager profiles

Resources