Search code examples
azureemaildnsazure-communication-services

Add custom domain for Azure email communication service


I created a domain in azure. for example mydomain-test.com and connected it with my static web app in azure, and it work. now I want that my app is able to send email. so I createded an email communication service. There in Provision domains I can add my domain. So I click on Add domain. I give my 'mydomain-test.com' in the field 'Enter your domain name'. After that 'Email Communication Service' ask my to verify the domain and so it gave me a TXT name:'mydomain-test.com' and a TXT Value = 'xxx'. I copy the TXT Value and go DNS Zone Service in Azure, there I click on Recod Set. but no mather what I write to name it add the '.mydomain-test.com' to the end of the text and even if I write noting it add the domain name like this: 'mydomain-test.mydomain-test.com'. I choose for Type (TXT- Text record type) and the value is 'xxxx' but it doesn't work. What am I doing here wrong?


Solution

  • To resolve it, follow these steps: In the Azure DNS Zone Service, create a new TXT record_. In the "Name" field, leav it blank or enter "@" (without the quotes) to represent the root domain (mydomain-test.com). For "Type," select "TXT - Text record type." In the "Value" field, paste the TXT Value provided by the Email Communication Service (e.g., 'xxx'). Save the record. Make sure that you haven't accidentally included the domain name in the "Name" field. Using "@" or leaving it blank should specify the root domain. It's normal for the DNS system to append the domain name itself, so you don't neeed to add it manually. Once the TXT record is correctly set up, you can then go back to the Email Communication Service and initiate the domain verification process. It should wo_rk as expected with the correct TXT record in place.