This guide will take you through how to delegate a sub-domain to Azure DNS zone. If you have a domain with an external provider, this guide will show you how to use Azure DNS zone PaaS to host your sub-domain.
Login to your Azure subscription and open Cloud Shell (in red box.)
Type in the following commands to create a resource group and Azure DNS zone.
## Azure CLI
# Create resource group
az group create --name MyResourceGroup --location "canadacentral"
# Create Azure DNS Zone
az network dns zone create -g MyResourceGroup -n subdomain.parentdomain.ca
## PowerShell
# Create resource group
New-AzResourceGroup -Name MyResourceGroup -location "canadacentral"
# Create Azure DNS Zone
New-AzDnsZone -ResourceGroupName MyDNSResourceGroup -Name subdomain.parentdomain.ca
Locate the name servers from the output of sub-domain Azure DNS zone creation (in red box.)
In your domain provider’s portal, add NS records with the name servers as the values.
Verify the sub-domain delegation is complete. You can use a tool such as Google Admin Toolbox – Dig.
Note: nslookup command in Cloud Shell might not work if you haven’t configure it to point to anything.
If you’d like to host something running at this newly created apex domain please follow our guide “Securing Apex Domain with Azure Front Door“