An Azure service that provides streamlined full-stack web app development.
Hello @Oleg
Based on the details you've provided, I don't think this is a normal DNS propagation or CNAME configuration issue.
Your CNAME already resolves to the correct *.azurestaticapps.net hostname, while the actual ARM operation:
Microsoft.Web/staticSites/customDomains/write is returning HTTP 404 / BadRequest. More importantly, the same failure occurs with multiple new domains and Static Web Apps across West Europe and Central US, while an existing custom domain continues working. That pattern points more toward a failure in the Static Web Apps custom-domain provisioning/validation backend than the individual DNS record.
One important validation detail is worth checking. Microsoft currently documents that custom-domain verification requires publicly resolvable DNS, and the Azure CLI supports TXT-token validation.
I would test one affected domain explicitly with TXT validation:
az staticwebapp hostname set \
--name hype-ad-pilot-psychology \
--resource-group hype-ad \
--hostname psychology.hype.ad \
--validation-method dns-txt-token \
--no-wait
Then check whether Azure has created the custom-domain resource/token:
az staticwebapp hostname show \
--name hype-ad-pilot-psychology \
--resource-group hype-ad \
--hostname psychology.hype.ad
Microsoft documents hostname show as the command that can retrieve the validation token generated for TXT validation.
If this still immediately returns the same 404 before a validation token/custom-domain resource is created, then DNS itself is unlikely to be the root cause. Azure isn't getting far enough into the operation to perform normal DNS validation.
You can also run the operation with --debug and retain the response/request information:
az staticwebapp hostname set \
-n hype-ad-pilot-psychology \
-g hype-ad \
--hostname psychology.hype.ad \
--validation-method dns-txt-token \
--debug
I would not delete or modify the existing working stage.hype.ad binding while troubleshooting this.
Given the combination of multiple new domains affected, multiple regions affected, existing bindings still working, and ARM customDomains/write returning 404, I think this warrants escalation to Microsoft if TXT validation produces the same result.
When opening the support request, provide the Correlation ID and Operation ID you've already captured, together with the UTC timestamp, subscription ID, Static Web App resource ID, affected domains, and the fact that both CNAME and TXT creation paths fail.
The key point for Microsoft to investigate is why the backend handling Microsoft.Web/staticSites/customDomains/write is returning NotFound even though the parent Static Web App resource exists and is operational.
Microsoft's documented behavior for a standard CNAME validation failure is that Azure validates whether the CNAME is available in public DNS; that doesn't match well with an immediate ARM-level 404 Not Found affecting several otherwise valid resources.
Sharing these references with you:
Microsoft - Custom domains with Azure Static Web Apps
Microsoft - Azure CLI: az staticwebapp hostname
Microsoft - Configure a Static Web Apps custom domain with an external DNS provider
At this point, I'd treat it as a likely service-side provisioning issue rather than repeatedly changing the DNS records, especially since you've reproduced it across multiple domains and regions.
Help make this community better for everyone: if this answer resolved your issue, please accept it or leave an upvote. If not, share more details in a comment so we can continue the discussion and find the right solution.