Azure Static Web App custom domain kcvue.mmoser.com stuck.

70797005 0 Reputation points
2026-08-19T04:23:59.91+00:00
Azure Static Web App custom domain kcvue.mmoser.com stuck.CNAME resolves correctly to ambitious-tree-08d7b6e00.2.azurestaticapps.net.Enterprise Grade Edge requires TXT validation, but Generate code fails with "domainName is invalid. The domain name given was not found."Current TLS cert served is *.msha-slice-2-hk1-1-ase.p.azurewebsites.net, causing hostname mismatch.
Azure Static Web Apps
Azure Static Web Apps

An Azure service that provides streamlined full-stack web app development.


2 answers

Sort by: Most helpful
  1. TP 162.1K Reputation points Volunteer Moderator
    2026-08-19T04:49:48.48+00:00

    Hi,

    You are getting "domainName is invalid. The domain name given was not found." when attempting to generate code because you have CAA records, but not for digicert.com, which effectively blocks Digicert.

    Below is dig output:

    User's image

    You see in output how you have CAA records for:

    • 0 issue "trust-provider.com"
    • 0 issue "letsencrypt.org"
    • 0 issue "sectigo.com"

    You need to add CAA record 0 issue "digicert.com" to mmoser.com

    After adding CAA record you may need to wait 1 hour for TTL to expire, then try to generate code again. You can try it sooner than 1 hour, but if it fails again wait and then try again.

    Once you have the code add DNS record as below;

    Type: TXT

    Host: _dnsauth.kcvue

    Value: <generated code>

    TTL: 600 (10 minutes)

    Custom domains with Azure Static Web Apps - Zero downtime migration

    https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain#zero-downtime-migration

    Please click Accept Answer and upvote if the above was helpful.

    Thanks.

    -TP

    Was this answer helpful?


  2. Abinesh Magudeeswaran 90 Reputation points Student Ambassador
    2026-08-19T04:37:04.1+00:00

    Based on the details provided, the CNAME itself appears to be resolving correctly, so the issue seems to be occurring during Azure's custom-domain/TXT validation rather than DNS resolution.

    A few things I would check:

    Confirm that kcvue.mmoser.com is not already associated with another Static Web App or Azure App Service, including an old/deleted resource. Azure can retain the previous association for some time.

    Since Enterprise-grade edge requires TXT validation, try removing the stuck custom-domain entry and adding kcvue.mmoser.com again. Generate a new TXT validation record.

    For the subdomain, the TXT record should normally be created under: _dnsauth.kcvue.mmoser.com

    Verify it publicly with: nslookup -type=TXT _dnsauth.kcvue.mmoser.com

    If Azure fails with domainName is invalid before it even generates the TXT token, this may indicate an Azure-side custom-domain association/state issue rather than a DNS propagation problem.

    Also check whether the DNS zone contains restrictive CAA records that could prevent certificate issuance.

    The certificate showing *.msha-slice-2-hk1-1-ase.p.azurewebsites.net would also be expected to cause a hostname mismatch until Azure successfully validates the custom domain and provisions the certificate.

    If the domain is not associated with any other Azure resource and TXT generation still fails, I would recommend opening an Azure Support request and providing the Static Web App resource ID and the exact domainName is invalid error, because the failure is occurring before TXT validation can actually complete.

    Microsoft has documented similar Static Web Apps cases where the same error occurred even though the DNS configuration was correct.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.