Redirecting to Origin host name App Service - azure

The problem is when I add a custom domain the custom domain was not working but when i access with default domain I can access app service.
Once the domain is up when I test the browser it redirects to the origin host name.
I tired to delete the origin host header but doesn't work its giving me a 404 error.
What am I missing in my configuration?

I have added a custom domain to azure front door using below steps.
Click on review+create.
We have to config some setting after deploying the azure front door.
GOTO custom domain as below.
In the DNS Zone select DNS name and set the Azure front door endpoint as below.
when I click on the custom domain, I can access the web app using front door custom domain.

Related

Azure Front Door custom domain redirects to the origin host name (App service)

We have an App Service.
In front of it we have an Azure Front Door.
Everything works perfectly with the Front door default domain .z01.azurefd.net.
The problem is when I am adding a custom domain in front door following the steps from the steps from this tutorial https://learn.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-add-custom-domain.
Once the domain in up, when I test it in the browser it redirects me to the origin host name: .azurewebsites.net. And that with both domains the custom one and the Front Door's default one.
I tried to delete the origin host header from the origin how it is described in this issue: https://learn.microsoft.com/en-us/answers/questions/288519/azure-frontdoor-exposing-backend-pool-url-when-aut but doesn't work it gives me a 404 error.
What is missing in my configuration?

The connection for this site is not securepizza-app.azurewebsites.net sent an invalid response. - Azure

Can you please assist?
I have created two web apps in Azure, in one service plan, same region. i place an application gateway in front of the Apps to route multi sites traffic and configured relevantly, listeners, and settings. All seems in place. Now i have two custom domains from godaddy, which point to the application gateway front end IP by changing the A record dns settings of each domain name to rout traffic to the relevant web app. But when i browser to custom domains, I'm getting this error attached every time.
enter image description here

Azure URL is not working for the new CNAME entry

Recently we have created a new CNAME entry for the internal react website which is deployed in Azure. It has been pointed to traffic manager since we are deploying in two regions. After the CNAME entry is create, the URL throws 404 error. We have already configured the entry access restriction to all internal users. Appreciate if anyone can help to identify the issue.
For the error, you could add the new CNAME subdomain to your app service---custom domains---add custom domain as the picture displaying steps 1-5. After you validate the subdomain and add the subdomain into the custom domains, you should access the subdomain URL via the traffic manager. Read this blog for more details.
In addition, only Web Apps at the Standard SKU or above are eligible for use with Traffic Manager. Attempts to add a Web App of a lower SKU fail. Read Azure web apps as the endpoints.

Azure Front Door keep custom URL in redirects

I have configured custom URL (let's say contoso.com) into Azure Front Door and routed that into App service (contoso.azurewebsites.net). Now when the customer navigates into https://contoso.com the Front Door redirects user into contoso.azurewebsites.net which is correct, but the URL in the browser changes into contoso.azurewebsites.net. Is it possible to configure Front Door to keep the original URL (contoso.com), or do I need to add some configuration into App Service?
"Backend host header" set to be blank and add your front door domain (https://contoso.com) to your app services custom domains with the certificate.
Front Door uses Backend host header to call the app service so request tells the App to use the *azurewebsites.net address as it's hostname. "Backend host header" set to be blank just passes the request hostname along to the backend. You need to add it to a custom domain so that the app service can accept that hostname.
https://edi.wang/post/2020/6/29/solving-azure-ad-sign-in-failure-with-azure-front-door

Azure Front Door - how to custom domain with default backend host name?

I have an azure app service which enabled custom domain as "www.mysite.com", we would like to set up a web application firewall on front door to protect slow read http attack.
After setting up Azure Front Door, my front end host is shown as "mysite.azurefd.net", and the issue of slow read http attack was gone, which is perfect!
But the new problem is, we want to custom front end host to "www.mysite.com" which eventually forwards/redirects to app service with the same domain name, not the default "mysite.azurefd.net". Because i always want user goes through front door to delivery request to my Azure app service
Is this doable?
But the new problem is, we want to custom front end host to
"www.mysite.com" which eventually forwards/redirects to app service
with the same domain name, not the default "mysite.azurefd.net".
You can add a custom name to your Azure front door frontend host name but you can not add the same domain name as the custom domain in your app service as A CNAME record is not allowed to coexist with any other data from RFC1912 section 2.4
In this case, you have to add a different domain like sub.mysite.com as the frontend host to your Azure front door like this, then add or update an existing routing rule that map frontend hosts sub.mysite.com with your path like /* to your existing backend pool of web app.

Resources