Turn a domain name into a working address with Azure DNS: host a DNS zone, add the record types that matter, point a name at an Azure resource with an alias record, and verify resolution.
DNS is the internet's phone book: it turns a name like example.com into a server's IP address. Azure DNS hosts those records for you. Why: you use it to point your domain at your load balancer, storage website, or Front Door endpoint.
List the DNS zones (domains) you already host
az network dns zone list --output tableA DNS zone holds all the records for one domain. Why: creating it gives you four Azure name servers; you set those at your domain registrar so the world asks Azure for your domain's answers.
Create a zone for your domain
az network dns zone create --resource-group learn-rg --name example.comNote the four name servers in the output — set these at your registrar
az network dns zone show --resource-group learn-rg --name example.com \
--query 'nameServers'A few record types cover most needs. A: name → IPv4 address. CNAME: name → another name. MX: where email goes. TXT: free-form text (used for domain verification). Why care: each points a different kind of traffic to the right place.
Add an A record: www -> a server IP, with a 300s time-to-live
az network dns record-set a add-record \
--resource-group learn-rg --zone-name example.com \
--record-set-name www --ipv4-address 203.0.113.10Add a TXT record (e.g. to prove domain ownership)
az network dns record-set txt add-record \
--resource-group learn-rg --zone-name example.com \
--record-set-name @ --value "verification=abc123"An alias record points a name straight at an Azure resource (a public IP, Front Door, or Traffic Manager) instead of a fixed IP. Why: the resource's address can change and the alias follows it, and unlike a CNAME it can sit at the root domain (example.com, not just www).
Point the root domain at a public IP resource via an alias A record
PIP_ID=$(az network public-ip show --resource-group learn-rg \
--name web-ip --query id --output tsv)az network dns record-set a create \
--resource-group learn-rg --zone-name example.com \
--name @ --target-resource $PIP_IDAfter adding records, confirm they resolve. Why: DNS changes take time to propagate, and querying directly tells you whether the record is live before you point real traffic at it.
Ask a public resolver for your record
nslookup www.example.com 8.8.8.8Or list everything in the zone to double-check your records
az network dns record-set list --resource-group learn-rg \
--zone-name example.com --output table