Custom domain TXT validation failure

Himanshu Sekhar Mohanty 0 Reputation points
2025-02-03T02:50:20.4233333+00:00

I am trying to add a custom domain to my Azure App Service with a private DNS name: my-pr3.eu.azure.dev.com. However, when I attempt to validate the domain, Azure incorrectly treats the DNS as dev.com and attempts to use app.my-pr3.eu.azure as the hostname, causing the validation to fail.

I guess this issue occurs because the domain has multiple periods in the name, and Azure appears to misinterpret this structure, resulting in an incorrect DNS validation. How can I fix this or is there any workaround for this specific case with multi-period domain names?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,266 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Laxman Reddy Revuri 2,390 Reputation points Microsoft Vendor
    2025-02-03T14:45:38.8933333+00:00

    Hi @Himanshu Sekhar Mohanty
    Thanks for the question and using MS Q&A platform.
    In Azure portal, validate the custom domain after creating a DNS zone in Azure Private DNS, and add CNAME record for your custom domain. This CNAME record should be mapped to the Azure App Service hostname.
    Regarding your specific issue with multi-period domain names, you are correct that Azure may misinterpret the structure of the domain name. One workaround for this is to use a subdomain that does not contain multiple periods. For example, instead of using my-pr3.eu.azure.dev.com, you could use my-pr3.azure.dev.com or my-pr3.eu.azuredev.com.

    If you still want to use the original domain name with multiple periods, you can try using a TXT record to validate the domain instead of a CNAME record. To do this, you would need to add a TXT record to the DNS zone that contains a verification code provided by Azure. Once the TXT record is added, you can validate the custom domain in the Azure portal.
    references:
    https://learn.microsoft.com/en-us/azure/dns/dns-web-sites-custom-domain#create-the-cname-record
    https://learn.microsoft.com/en-us/azure/dns/private-dns-getstarted-portal
    Please accept as "Yes" if the answer provided is useful, so that you can help others in the community looking for remediation for similar issues.


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.