Quickstart: How to add custom verified domains to Email Communication Service
In this quick start, you learn about how to add a custom domain and verify in Azure Communication Services to send email.
Prerequisites
- An Azure account with an active subscription. Create an account for free.
- An Azure Email Communication Services Resource created and ready to provision the domains Get started with Creating Email Communication Resource
Azure Managed Domains vs. Custom Domains
Before provisioning a Custom Domain, review the following table to determine which domain type is most appropriate for your particular use case.
Azure Managed Domains | Custom Domains | |
---|---|---|
Pros: | - Setup is quick & easy - No domain verification required |
- Emails are sent from your own domain |
Cons: | - Sender domain is not personalized and cannot be changed | - Requires verification of domain records - Longer setup for verification |
Provision custom domain
To provision a custom domain, you need to:
- Verify the custom domain ownership by adding TXT record in your DNS.
- Configure the sender authentication by adding SPF and DKIM records.
Verify custom domain
Go the overview page of the Email Communications Service resource that you created earlier.
Setup Custom Domain.
(Option 1) Click the Setup button under Setup a custom domain. Move to the next step.
(Option 2) Click Provision Domains on the left navigation panel.
Click Add domain on the upper navigation bar.
Select Custom domain from the dropdown.
Navigate to "Add a custom Domain."
Enter your "Domain Name" and re enter domain name.
Click Confirm
Ensure that domain name isn't misspelled or click edit to correct the domain name and confirm.
Click Add
A custom domain configuration is created for your domain.
You can verify the ownership of the domain by clicking Verify Domain
.
If you would like to resume the verification later, you can click Close and resume the verification from Provision Domains by clicking Configure .
Clicking Verify Domain or Configure navigates to "Verify Domain via TXT record" to follow.
Add the above TXT record to your domain's registrar or DNS hosting provider. Refer to the adding DNS records in popular domain registrars table for information on how to add a TXT record for your DNS provider.
Click Next once you've completed this step.
Verify that TXT record is created successfully in your DNS and Click Done
DNS changes take up to 15 to 30 minutes. Click Close
Once your domain is verified, you can add your SPF and DKIM records to authenticate your domains.
Configure sender authentication for custom domain
To configure sender authentication for your domains, additional DNS records need to be added to your domain. Below, we provide steps where Azure Communication Services will offer records that should be added to your DNS. However, depending on whether the domain you are registering is a root domain or a subdomain, you will need to add the records to the respective zone or make appropriate alterations to the records that we generate.
As an example, let's consider adding SPF and DKIM records for the custom domain "sales.us.notification.azurecommtest.net." The following are different methods for adding these records to the DNS, depending on the level of the Zone where the records are being added.
- Zone: sales.us.notification.azurecommtest.net
Record | Type | Name | Value |
---|---|---|---|
SPF | TXT | sales.us.notification.azurecommtest.net | v=spf1 include:spf.protection.outlook.com -all |
DKIM | CNAME | selector1-azurecomm-prod-net._domainkey | selector1-azurecomm-prod-net._domainkey.azurecomm.net |
DKIM2 | CNAME | selector2-azurecomm-prod-net._domainkey | selector2-azurecomm-prod-net._domainkey.azurecomm.net |
The records that get generated in our portal assumes that you will be adding these records in DNS in this Zone sales.us.notification.azurecommtest.net.
- Zone: us.notification.azurecommtest.net
Record | Type | Name | Value |
---|---|---|---|
SPF | TXT | sales | v=spf1 include:spf.protection.outlook.com -all |
DKIM | CNAME | selector1-azurecomm-prod-net._domainkey.sales | selector1-azurecomm-prod-net._domainkey.azurecomm.net |
DKIM2 | CNAME | selector2-azurecomm-prod-net._domainkey.sales | selector2-azurecomm-prod-net._domainkey.azurecomm.net |
- Zone: notification.azurecommtest.net
Record | Type | Name | Value |
---|---|---|---|
SPF | TXT | sales.us | v=spf1 include:spf.protection.outlook.com -all |
DKIM | CNAME | selector1-azurecomm-prod-net._domainkey.sales.us | selector1-azurecomm-prod-net._domainkey.azurecomm.net |
DKIM2 | CNAME | selector2-azurecomm-prod-net._domainkey.sales.us | selector2-azurecomm-prod-net._domainkey.azurecomm.net |
- Zone: azurecommtest.net
Record | Type | Name | Value |
---|---|---|---|
SPF | TXT | sales.us.notification | v=spf1 include:spf.protection.outlook.com -all |
DKIM | CNAME | selector1-azurecomm-prod-net._domainkey.sales.us.notification | selector1-azurecomm-prod-net._domainkey.azurecomm.net |
DKIM2 | CNAME | selector2-azurecomm-prod-net._domainkey.sales.us.notification | selector2-azurecomm-prod-net._domainkey.azurecomm.net |
Adding SPF and DKIM Records
Navigate to Provision Domains and confirm that Domain Status is in "Verified" state.
You can add SPF and DKIM by clicking Configure. Add the following TXT record and CNAME records to your domain's registrar or DNS hosting provider. Refer to the adding DNS records in popular domain registrars table for information on how to add a TXT & CNAME record for your DNS provider.
Click Next once you've completed this step.
Verify that TXT and CNAME records are created successfully in your DNS and Click Done
DNS changes take up to 15 to 30 minutes. Click Close
Wait for Verification to complete. You can check the verification status from Provision Domains page.
Once your sender authentication configurations are successfully verified, your email domain is ready to send emails using custom domain.
Changing MailFrom and FROM display name for custom domains
You can optionally configure your MailFrom address to be something other than the default DoNotReply, and also add more than one sender username to your domain. To understand how to configure your sender address, see how to add multiple sender addresses.
Your email domain is now ready to send emails.
Adding DNS records in popular domain registrars
TXT records
The following links provide additional information on how to add a TXT record using many of the popular domain registrars.
Registrar Name | Documentation Link |
---|---|
IONOS by 1 & 1 | Steps 1-7 |
123-reg.co.uk | Steps 1-6 |
Amazon Web Services (AWS) | Steps 1-8 |
Cloudflare | Steps 1-6 |
GoDaddy | Steps 1-6 |
Namecheap | Steps 1-9 |
Network Solutions | Steps 1-9 |
OVH | Steps 1-9 |
web.com | Steps 1-8 |
Wix | Steps 1-5 |
Other (General) | Steps 1-4 |
CNAME records
The following links provide additional information on how to add a CNAME record using many of the popular domain registrars (Make sure to use the values from the configuration window rather than the ones in the documentation link.)
Registrar Name | Documentation Link |
---|---|
IONOS by 1 & 1 | Steps 1-10 |
123-reg.co.uk | Steps 1-6 |
Amazon Web Services (AWS) | Steps 1-8 |
Cloudflare | Steps 1-6 |
GoDaddy | Steps 1-6 |
Namecheap | Steps 1-8 |
Network Solutions | Steps 1-9 |
OVH | Steps 1-8 |
web.com | Steps 1-8 |
Wix | Steps 1-5 |
Other (General) | Guide |
Next steps
The following documents may be interesting to you:
- Familiarize yourself with the Email client library
Feedback
Submit and view feedback for