creating your website in Azure
creating your website in Azure

Let’s be honest; Microsoft Azure is a playground for the more technically savvy crowd. In our previous post, we discussed website hosting and the related costs associated with it, today we’re going to discuss how to Creating Your Website in Azure.  While Microsoft Azure may be an affordable option, the ease of use and the challenging steps for deployment will likely be off-putting for you.

With that said, you’ll find the instructions to create or ‘map’ a custom domain below along with a full explanation of things to consider and what is available to you.


Hint: If you still need help getting started with hosting your website and uploading your content, see our last article for full details. 


Domain Names on Azure: The Fine Print 


Creating Your Website’s Custom Domain in Microsoft Azure is an important step in keeping your website accessible. If you’ve already set up your website, you may have noticed that the URL is quite unfriendly. While you can create your website’s custom domain in Microsoft Azure, you should know two things to consider: 



  • First, you can only map subdomains to the Microsoft Azure static website endpoint (for example, www.example.ba will work, while mapping a root domain example.ba will not work ). Though there are workarounds for that also, keep reading. 



  • Second, if you want to serve your website over SSL (Secure Sockets Layer, the encryption protocol that keeps your internet connection secure), you have to use the Azure CDN (Content Delivery Network). Though it isn’t free, Azure CDN’s pricing starts at $0.081 per GB (outbound transfer), which is still a very affordable option considering that static websites are really small.  


If neither of these considerations is a gamechanger, continue reading for instructions on setting up your custom domain name. 


How to Map Your Custom Domain Name 


To start creating your website’s custom domain in Microsoft Azure (for HTTP-only access), follow these steps: 



  1. Take your Azure Storage Static Website Primary Endpoint link and remove the https:// and the trailing / from it. 

    • I.E. https://kdstaticwebsite.z1.web.core.windows.net/ becomes kdstaticwebsite.z1.web.core.windows.net 





  1. Go to your Domain registrar or your domain NameServer hosting provider, such as GoDaddy, and create a CNAME record to point to your Azure static website endpoint host name.

    • A CNAME record is a type of DNS (domain name system server) record that maps a source domain name to a destination domain name, I.E., customdomain.com and www.customdomain.com would send you to the same website.  





  1. Create a CNAME under your desired custom Domain.  

    • I will create a kdstatic.staging.staging.networkantics.com CNAME (the subdomain is required, root domains are not supported) pointing to the A record (A record is our stripped Azure Storage Static Website Primary endpoint link) kdstaticwebsite.z1.web.core.windows.net 





  1. Go to Azure portal -> Static website Azure storage account. 



  1. Under Security + networking, select Networking. 



  1. Switch to the Custom domain tab at the top as seen in the image below.  



  1. Under Domain name, type in the CNAME domain record you created before. 

    • I.E., kdstatic.staging.staging.networkantics.com 





  1. Click on Save. Your domain is verified.

Computer screenshot of Azure configurations - Setting CNAME domain

Creating Your Website in Azure Summary

  1. Navigate to Storage Account’s Settings -> Configuration. 
  2. Set Secure transfer required to Disabled.

 

Leave A Comment