https://learn.microsoft.com/en-us/cli/azure/?view=azure-cli-latest
1.Resource Group | az group create -l westeurope -n Domains
2.CDN > profile > create | az cdn profile create -g Domains -n HomeProfile --sku Premium_Verizon
3.CDN > endpoint > create | az cdn endpoint create -g Domains -n HomeEndpoint --profile-name HomeProfile --origin www.home1991-2000.com
4.DNS > Zones > create | az network dns zone create -g Domains -n www.home1991-2000.com
5.DNS > Record sets > CNAME > create | az network dns record-set cname create -g Domains -z www.home1991-2000.com -n HomeRecordSet
6.eventgrid > domain > create | az eventgrid domain create -g Domains --name home1991-2000 -l westeurope
7.CDN > custom-domain > create | az cdn custom-domain create -g Domains --endpoint-name HomeEndpoint --profile-name HomeProfile -n home1991-2000-name --hostname www.home1991-2000.com
I'm receive these bad request. Can anyone help ?
BadRequest - We couldn't find a DNS record for custom domain that points to endpoint. To map a domain to this endpoint, create a CNAME record with your DNS provider for custom domain that points to endpoint.
Quoting the official docs:
Therefore, as the error message points out, you will need to create a CNAME record with your DNS provider for your custom domain that points to your CDN endpoint, i.e.,
HomeEndpoint.azureedge.net
.As a pre-req, in order to use Azure DNS for your custom domain, you must first delegate your domain to Azure DNS. If you do not already have a custom domain, you must first purchase one with a domain provider.
Once this is done, you can associate the custom domain with your CDN endpoint.
Note: The
az network dns record-set cname create
command only creates an empty CNAME record set. You might want to useaz network dns record-set cname set-record
instead to actually also set the value of a CNAME record.References: