theblindprophet
theblindprophet

Reputation: 7947

Azure DNS zone, www responding with 404

I have DNS records for a web-app service, also hosted with Azure.

The site works if I do not prepend www on the url and sends back the following page if I do prepend it:

enter image description here

Here is my A record (I saw something about creating this):

enter image description here

I have looked everywhere I cannot find any good answers.

In other DNS management services I would just do this:

enter image description here

but I cannot do that here.

Upvotes: 0

Views: 205

Answers (1)

user9105725
user9105725

Reputation:

You should set CNAME to your Azure websites URL

New-AzDnsRecordSet -ZoneName contoso.com -ResourceGroupName "MyAzureResourceGroup" `
 -Name "www" -RecordType "CNAME" -Ttl 600 `
 -DnsRecords (New-AzDnsRecordConfig -cname "contoso.azurewebsites.net")

This looks like it is useful. It provides the full process:

https://learn.microsoft.com/en-us/azure/dns/dns-web-sites-custom-domain

Upvotes: 1

Related Questions