Hey all!
I have been following these steps:
https://www.mikaelsand.se/2022/09/custom-domain-for-a-static-webapp-using-bicep/
To map a custom domain name to my Azure SWA. First I added a CNAME record to my DNS provider:
CNAME: ticket-notes-module.test.loyally.nl -> zealous-flower-032981e03.3.azurestaticapps.net
This is my bicep file:
// Load JSON Content
var environmentVariables = loadJsonContent('./env_variables.json')
var appServiceAppName = environmentVariables.webAppName
var webAppName = '${appServiceAppName}-test'
param location string = 'West Europe'
resource staticWebApp 'Microsoft.Web/staticSites@2022-09-01' = {
name: webAppName
location: location
properties: {}
sku: {
name: 'Free'
tier: 'Free'
}
}
resource staticwebApplicationDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = {
name: 'ticket-notes-module.test.loyally.nl'
parent: staticWebApp
}
This deploys succesfully and I can see the custom domain in my app:

NSLookup also seems to find the match:
nslookup ticket-notes-module.test.loyally.nl
Server: dns.mnd.iss.as9143.net
Address: 2001:b88:1002::10
Non-authoritative answer:
Name: waws-prod-am2-4f0021d1.sip.p.azurewebsites.windows.net
Address: 20.101.2.157
Aliases: ticket-notes-module.test.loyally.nl
zealous-flower-032981e03.3.azurestaticapps.net
azurestaticapps3.trafficmanager.net
msha-slice-3-am2-0.msha-slice-3-am2-0-ase.p.azurewebsites.net
But when I browse to http://www.ticket-notes-module.test.loyally.nl/ it doesn't work. Does anybody have any clue what i'm doing wrong?
Thanks in advance!