Validation of custom domain keeps failing

Harry 81 Reputation points
2026-04-08T11:03:09.64+00:00

In Azure Static Web Apps I am trying to add a custom domain for a domain which is hosted externally.

Each time I try this, the validation takes roughly 48 hours before it fails with the error message:

An unknown error has occurred while adding your custom domain. Please try again later.

I tried to add the validation at the domain itself and also for the hostname I want to use, both behave the same way.

I already have another site, where this works just fine (it's a .com domain)

Is it possible, that this fails, because the domain I want to use is .space?

I validated the TXT records via nslookup and they are looking ok to me.

I have no idea what could be wrong and this error message does not help debugging at all.

Azure Static Web Apps
Azure Static Web Apps

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


Answer accepted by question author
Praneeth Maddali 12,585 Reputation points Microsoft External Staff Moderator
2026-04-13T16:06:47.9266667+00:00

Hi @Harry

Thanks for confirmation through private chat that the issue is resolved

from investigation we found that The CNAME for<> is resolving correctly to your Static Web App (nice to see the full chain to the Azure edge). However, the TXT validation record that Azure needs isn’t showing up when queried. That’s why validation keeps failing after ~48 hours with the generic “An unknown error has occurred while adding your custom domain.”

Quick fix

Azure requires the TXT ownership record to be placed at a specific host for subdomains:

  • Host/Name: _<>(or _dnsauth.<>depending on how your DNS provider displays it)
  • Type: TXT
  • Value: the exact verification token Azure gives you (the long string that appears after you click “Generate Code”)

You most likely added the TXT at the root (signalcartel.space) or directly on the subdomain itself — that’s why the dig/nslookup for TXT on <>only returns the CNAME chain instead of the token.

Recommended steps (do them in order)

  1. In the Azure portal, delete the failed custom domain entry and wait 5–10 minutes.
  2. Add the domain again (or use Azure CLI for a cleaner experience): Bash
       az staticwebapp hostname set \
          --resource-group <YourRG> \
          --name <YourStaticWebAppName> \
          --hostname <> \
          --validation-method dns-txt-token
    
    Then run this to get the exact token:
          az staticwebapp hostname show \
            --resource-group <YourRG> \
            --name <YourStaticWebAppName> \
            --hostname <> \
            --query validationToken -o tsv
    
    1. Add the TXT record exactly as shown above. Set TTL to the lowest value your provider allows (usually 300 or 5 minutes).
  3. (Strongly recommended) Add this CAA record at the root of signalcartel.space to allow DigiCert (the CA Azure uses) to issue the free certificate:
  • Type: CAA
  • Host: @ (or blank)
  • Value: 0 issue "digicert.com"

Wait 15–30 minutes, then go back to the custom domain blade and click Refresh/Validate.

Reference:

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

https://learn.microsoft.com/en-us/azure/static-web-apps/custom-domain-external

https://learn.microsoft.com/en-us/troubleshoot/azure/app-service/connection-issues-with-ssl-or-tls/troubleshoot-custom-domain-issues-azure-app-service

 Please do not forget to click "Accept the answer” and Yes, this can be beneficial to other community members.

If you have any other questions, let me know in the "comments" and I would be happy to help you

Was this answer helpful?

0 comments No comments

1 additional answer

Sort by: Most helpful
  1. AI answer

    2026-04-08T11:03:36.5+00:00

    The top-level domain (.space vs .com) is not the cause. Azure Static Web Apps supports custom domains as long as DNS and ownership validation are correctly configured and publicly resolvable.

    For externally hosted DNS, validation failures after long delays are almost always due to one of these issues:

    1. TXT record not in the authoritative DNS zone
      • The TXT record must be created in the DNS zone that is actually authoritative for the domain.
      • If the domain’s nameservers point to a provider (for example, Microsoft 365 or another DNS host), any TXT records created at a different provider or at the registrar level are ignored.
      • Confirm the nameservers for the domain, then ensure the TXT record is created in that provider’s DNS zone.
    2. DNS propagation or visibility problems
      • Azure requires the TXT (and CNAME, if used) records to be publicly resolvable.
      • Use external tools (for example, digwebinterface, Whats My DNS, DNS Checker) to confirm that:
        • The TXT record name exactly matches what Azure requested (for root vs subdomain).
        • The TXT value exactly matches the verification token (no extra spaces or characters).
      • Propagation can take up to 48 hours depending on TTL and provider performance.
    3. Incorrect TXT record name format
      • For root domains, the TXT record name must be asuid.yourdomain (often entered as @ at some registrars).
      • For subdomains, it must be asuid.subdomain (for example, asuid.www).
      • Any deviation (extra prefixes, missing asuid, wrong subdomain) causes ownership validation to fail.
    4. Stuck validation state
      • If records are correct and globally visible but the portal remains stuck or fails with a generic error after a long time, a practical workaround (from a similar Static Web Apps case) is:
        1. Delete the existing CNAME for the custom hostname.
        2. Add the TXT validation record manually and wait until it is visible globally.
        3. Retry validation in Azure.
        4. After validation succeeds, remove the TXT and re-add the CNAME if needed.
    5. Domain already linked elsewhere in Azure
      • If the same hostname was previously mapped to another Azure resource and not removed, Azure can block reuse to prevent takeover. In that case, a support ticket is required to release the domain after proving ownership.

    Concrete steps to resolve:

    1. Verify authoritative DNS
      • Check which nameservers the domain uses.
      • Ensure the TXT record is created in that provider’s DNS zone, not just at the registrar.
    2. Recreate TXT record precisely
      • Delete any incorrect TXT records.
      • Recreate the TXT record with the exact name and value Azure Static Web Apps provides.
      • Wait for propagation and confirm via external DNS tools.
    3. Retry validation
      • In the Static Web App → Custom domains blade, retry adding/validating the domain after DNS is confirmed correct.

    The .space TLD itself is not a limitation; the issue is almost certainly DNS ownership validation or propagation.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.