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

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

  1. Go the overview page of the Email Communications Service resource that you created earlier.

  2. Setup Custom Domain.

    • (Option 1) Click the Setup button under Setup a custom domain. Move to the next step.

      Screenshot that shows how to set up a custom domain.

    • (Option 2) Click Provision Domains on the left navigation panel.

      Screenshot that shows the navigation link to Provision Domains page.

    • Click Add domain on the upper navigation bar.

    • Select Custom domain from the dropdown.

  3. Navigate to "Add a custom Domain."

  4. Enter your "Domain Name" and re enter domain name.

  5. Click Confirm

    Screenshot that shows where to enter the custom domain value.

  6. Ensure that domain name isn't misspelled or click edit to correct the domain name and confirm.

  7. Click Add

    Screenshot that shows how to add a custom domain of your choice.

  8. A custom domain configuration is created for your domain.

    Screenshot that shows the progress of custom domain Deployment.

  9. You can verify the ownership of the domain by clicking Verify Domain

    Screenshot that shows custom domain is successfully added for verification. .

  10. If you would like to resume the verification later, you can click Close and resume the verification from Provision Domains by clicking Configure .

    Screenshot that shows the added domain ready for verification in the list of provisioned domains.

  11. Clicking Verify Domain or Configure navigates to "Verify Domain via TXT record" to follow.

    Screenshot that shows the Configure link that you need to click to verify domain ownership.

  12. 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.

  1. Verify that TXT record is created successfully in your DNS and Click Done

  2. DNS changes take up to 15 to 30 minutes. Click Close

    Screenshot that shows the domain verification is in progress.

  3. Once your domain is verified, you can add your SPF and DKIM records to authenticate your domains.

    Screenshot that shows the custom domain is verified.

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.

  1. 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.

  1. 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
  1. 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
  1. 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

  1. Navigate to Provision Domains and confirm that Domain Status is in "Verified" state.

  2. 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. Screenshot that shows the D N S records that you need to add for S P F validation for your verified domains. Screenshot that shows the D N S records that you need to add for D K I M. Screenshot that shows the D N S records that you need to add for additional D K I M records.

  3. Verify that TXT and CNAME records are created successfully in your DNS and Click Done

    Screenshot that shows the DNS records that you need to add for S P F and D K I M.

  4. DNS changes take up to 15 to 30 minutes. Click Close

    Screenshot that shows that the sender authentication verification is in progress.

  5. Wait for Verification to complete. You can check the verification status from Provision Domains page.

    Screenshot that shows that the sender authentication verification is done.

  6. Once your sender authentication configurations are successfully verified, your email domain is ready to send emails using custom domain.

    Screenshot that shows that your verified custom domain is ready to send Email.

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.

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: