I'm trying to add a custom domain to my static web app

Pavlin Penev 0 Reputation points
2025-06-16T15:27:04.6166667+00:00

Hello,

I'm trying to add a custom domain to my static web app but it throws an error.
User's image

As you can see the image I'm trying to add this domain to the www subdomain. I can confirm that the DNS record for validating the domain ownership is indeed set in my provider and more than 12 hours have passed since then.

Can you advice on what the issue would be?

Thank you in advance!

Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
1,173 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Siva Nair 2,340 Reputation points Microsoft External Staff Moderator
    2025-06-17T16:29:59.12+00:00

    Hi Pavlin Penev,

    solution by pavlin - Yes, we managed to fix the issue. We deleted the set custom domain, the already set TXT record and re-added it using CNAME directly and it validated.

    You're absolutely right that the domain ownership validation step comes first, and the CNAME should only be added after successful validation. Since the error is occurring during the TXT record validation, here are a few things we can double-check to help move this forward:

    1. TXT Record Name Format For a www subdomain, Azure typically expects the TXT record name to be: asuid.www Please ensure that your DNS provider hasn’t automatically appended the domain name (e.g., asuid.www.example.com), which can cause validation to fail.
    2. TXT Record Value Double-check that the value matches exactly what Azure provided — no extra quotes, spaces, or formatting changes.
    3. DNS Lookup Confirmation You can use a tool like https://toolbox.googleapps.com/apps/dig/ to confirm the TXT record is publicly visible. Just run: dig TXT asuid.www.example.com
    4. Azure Cache or Stale Validation If everything looks correct, try removing the domain from Azure, waiting 10–15 minutes, and then re-adding it. This can help clear any cached validation attempts.

    If you have any further assistant, do let me know.

    0 comments No comments

Your answer

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