configuring custom domains on azure using namecheap
Azure is a very powerful cloud platform that allows you to host pretty much anything on Microsoft’s servers in the cloud. For me, this means setting up personal/business websites and hosting them on Microsoft’s servers. However, the one caveat with this is that any domain name on this surface is appended with .azurewebsites.net. The solution to this is to purchase a domain name and configure on the Azure website of interest. Setting this up was not the easiest so below are the steps I took to get it to work. Note: these steps depict a domain purchased on namecheap.com however the process should be similar for any domain registrar.
- Login into Azure Management Portal.
- Click on any current site you wish add a custom domain to.
- Click on the Scale link near the top of the page and change the Web Hosting Plan Mode to Shared.
- Click on the Manage Domains button at the bottom of the page.
- Copy the IP address shown near the bottom of the pop-up window.
- Login into namecheap.com.
- Hover over your username at the top of the page and click on the Manage Domains button.
- Select the domain name you wish to link with Azure.
- Click on the All Host Records link on the left sidebar of the page.
- Place your specific Azure-generated IP address into the very top row (with the @ sign) and change the record type to A (Address). Additionally, add the 4 alias names CNAME (Alias) depicted below using the same dub-domain settings. Note, my example uses jonsadka in each of these aliases however you need to replace this with your domain to work.
- Go back to the Manage Domains window on the Azure Management Portal and add your custom domain name. When you input the site, you will receive a green check mark meaning everything is set up correctly. Save your changes and enjoy!.