Hi @Fredrik Gjaerdman
Thank you for reaching us regarding the issue.
Azure Static Web Apps provides free SSL/TLS certificates for custom domains, and each custom domain can only be bound to a single resource. If you attempt to bind a domain that is already associated with another resource or is in a conflicting state, the operation will fail. Additionally, some domain registrars, such as GoDaddy, do not fully support the DNS records required for apex (root) domains, including ALIAS or ANAME records or reliable CNAME flattening. In such cases, Microsoft recommends hosting your domain zone in Azure DNS to ensure better compatibility and reliable global DNS distribution.
Setup and Management Recommendations
- For subdomains (e.g., www): Configure a CNAME record pointing to your app's default hostname (*.azurestaticapps.net).
- For apex domains: Use supported records (ALIAS/ANAME where available) or fall back to an A record (not recommended for global traffic, as it limits Azure’s edge distribution).
- Validation requires the domain to be publicly resolvable. DNS changes must propagate before full functionality (including certificate issuance).
Handling Issues (Removal and Reconfiguration)
The documentation emphasizes proper disassociation:
- Before re-adding or migrating a domain, fully remove it from any previous binding.
- If migrating between Static Web Apps (or instances in the same slice), first remove the domain from the original resource. This may involve some downtime.
Recommended Actions:
- Remove conflicting DNS records at your provider (GoDaddy) to allow clean disassociation.
- In the Azure portal, navigate to your Static Web App > Custom domains and attempt to delete the problematic domain.
- Wait for propagation and backend updates (DNS and Azure operations can take time).
- Once cleared, re-add the custom domain following the external provider steps, starting with ownership validation.
- If using GoDaddy, strongly consider migrating the DNS zone to Azure DNS for apex domain support.
Reference:
https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain
Kindly let us know if the above helps or you need further assistance on this issue.
Please "accept" if the information helped you. This will help us and others in the community as well.