0
votes

Having referred to the following SO post: Redirecting non-WWW to WWW in an Azure Website

I have been working on adding an SSL certificate to an azure website which has the address mytestapp.azurewebsites.net which I am now able to access via https mydomain.com, http www.mydomain.com and http mydomain.com but if I try to access https www.mydomain.com I am getting a certificate error that is not being displayed when the www. has been omitted

How can I ensure that both www.mydomain.com and mydomain.com are both secured by HTTPS

2

2 Answers

1
votes

Your certificate is probably only valid for mydomain.com and not www.mydomain.com. You will need to have the certificate reissued to include www.mydomain.com in addition to mydomain.com.

It is not possible to circumvent this issue using redirects.

1
votes

I had previously deployed the webapp to the wrong region and so had to delete and create in the correct region. It seems that the DNS changes had still been in place for the deleted web app. To get this working I did the following:

  • A record pointing to IP address
  • TXT record pointing myapp.azurewebsites.net
  • CNAME record pointing to myapp.azurewebsites.net