Hosting websites on Windows Azure VM using IIS

I will try to answer some of the FAQs about hosting websites on IIS on a Windows Azure VM in this post.

1. I have created a Windows Azure VM and installed IIS on it. I am able to browse the default website locally. But when I try to access the site externally using <vm name>.cloudapp.net it times out everytime.

> To access the website externally over HTTP, we have to create an HTTP endpoint for the VM from the Windows Azure Management portal.

 

 

 

2. How to I enable SSL on my website hosted on Azure VM?

> This is pretty same as we do on a physical machine. You need a valid certificate to add https binding for the website in IIS server manager. Once this is done you have to just add HTTPS endpoint on Windows Azure Management portal for the VM.

 

3. I have been able to access access my site externally using https://myvm.cloudapp.net. But I would like to have a custom domain name for my site i.e. https://www.abc.com

> In the DNS for the custom domain provider where you have registered abc.com, we need to create a CNAME record mapping for www.abc.com to myvm.cloudapp.net. Once done, you should be able to access your website using www.abc.com.