I configured my DNS to resolve to my azure web app via CNAME pointing to my azurewebsites.net URL. However my site does not come up when I navigate to the URL, instead I see a 404 error.
1 Answers
The web application needs to have the custom domain configured from the azure side as well. You can do that via the Azure portal. Go to the portal, select your web application, and go to the Custom Domain blade. Click the Add hostname button.
If you're adding a hostname using a CNAME record, enter the full custom domain in the hostname box, select the CNAME record type, click the Validate button, and then click the Add hostname button.
If you're adding a hostname using an A* record, the steps are the same as for a CNAME record, just make sure to set the Hostname record type to A record.
There is an issue with caching in the Azure Portal so it might take some time for the change to be reflected in the Custom Domains blade.
Here's a link for the full overview of adding a custom domain to an azure app: https://docs.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-custom-domain#map-an-a-record.