Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Azure website returns 404 error after adding custom domain

Tags:

I'm using the Azure Websites hosting in shared mode. After going through the process of adding a custom domain I seem to be getting a 404 when browsing to www.mydomain.com

When I browse to my site using the *.azurewebsites.net address it renders perfectly. I have also turned on all available logging and can't see the 404 errors in the web logs or any other signs of the problem.

To configure the custom domain name I followed instructions on this page, including setting up the CNAME record to awverify.mysite.com and an A record to the IP address provided in the portal.

I know there are other questions on SO, like this or this but none of them provide an answer that fits my http 404 issue. Also many of the questions on SO seem to be out of date not that azure websites support domain names in shared mode (I believe)

Cheers Rob

like image 799
Rob Bird Avatar asked Jan 22 '13 22:01

Rob Bird


People also ask

Can you add a custom domain for the Azure function?

You can configure a vanity or custom domain for Azure Function Apps, Public IP addresses, App Service (Web Apps), Blob storage, and Azure CDN.

How do I point my GoDaddy domain to Azure?

Log on to your account with GoDaddy.com, and select My Account and then Manage my domains. Finally, select the drop-down menu for the domain name that you wish to use with your Azure web app and select Manage DNS. From the Domain details page, scroll to the DNS Zone File tab.


1 Answers

The tried and tested method of going to bed and having another look in the morning seemed to work for me;) (Which means it turns out to be my own stupidity)

I had only added 'mydomain.com' in the azure portal and needed to add 'www.mydomain.com' as well.

I could swear that I saw some help text in the portal saying that domains should be input in that format though. Oh well never mind. I hope this helps someone else with the same error.

like image 156
Rob Bird Avatar answered Sep 20 '22 01:09

Rob Bird