2 Easy Ways to Setup DKIM on Office 365

Protects from email spoofing

Reading time icon 3 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Setup DKIM on Office 365

Using DomainKeys Identified Mail (DKIM) with Microsoft 365 can help you establish trust for the outbound emails from a custom domain in destination email systems. Let’s see how you can set up DKIM on Office 365.

How can I set up DKIM on Office 365?

1. Using the Microsoft 365 Defender

Note icon NOTE
To set up DKIM on Microsoft 365, you need to follow all the steps listed in the same manner.
  1. Create DKIM keys
  1. Visit the Microsoft 365 Defender website and sign in using your Microsoft account.
  2. Double-click on the domain that you will choose to send emails.Create DKIM keys - how to setup dkim office 365
  3. On the following pop-up, select Create DKIM keys.
  4. Once created, you will get a Public CNAMEs pop-up; click Copy & paste it on a Sticky note or Notepad to save the keys.Public CNAMEs

2. Login at your DNS hosting provider & create the DKIM records

  1. Go to your DNS hosting provider, then locate DNS records management.
  2. First, we need to create two CNAMEs records.
  3. Select Add New Record, then enter the following details:
    • Type – Choose CNAME
    • Name – Enter the first Host Name from the key that you copied in Step 1
    • Value – Mentio the value that you copied for the first Host Name
    • TTL – Select Default
  4. Choose Add More Records, then add the second CNAME record.
  5. Click Save All Records.

You need to wait for a few minutes to a day, depending upon your DNS providers. Once done, proceed to the next step.

3. Enable DKIM

  1. Visit the Microsoft 365 Defender website and sign in using your Microsoft account.
  2. Double-click the domain and toggle the switch for Sign messages for this domain with DKIM signatures.DKIM enable setup office 365
  3. In case you get an error, wait for more time and try enabling it after some time. If it still doesn’t work, check the CNAMEs and other details to ensure the records are correct.

4. Verify DKIM records for Microsoft 365

  1. Open the Microsoft 365 admin center using this link.
  2. On the How can we help pop-up, type DKIM in the first box, enter your Domain name, and then click Run Tests.Microsoft 365 admin center
  3. Once the diagnostics are complete, you will get the confirmation of the successful creation of DKIM.

2. Using the Windows PowerShell

  1. Press the Windows key, type PowerShell in the search box, and click Run as administrator.Powershell - how to setup dkim office 365
  2. First, ensure you are connected to Exchange Online; if not, follow the steps in this guide.
  3. Type the following command to a notepad, replace <domain> with the domain name, and replace Selector1CNAME and Selector2CNAME with the Host Name you copied in the first method. Copy & paste to the PowerShell window and press Enter: Get-DkimSigningConfig -Identity <domain> | Format-List Selector1CNAME, Selector2CNAMECommand to setup DKIM
  4. Next, add the CNAMEs to your DNS hosting provider using Step 2 in Method 1.
  5. To enable the DKIM in Office 365, open PowerShell with admin rights again, type the following command, then replace <Domain> with the domain name and hit Enter: SSet-DkimSigningConfig -Identity <Domain> -Enabled $true

To conclude, you can either use Microsoft 365 Defender to create and set up DKIM or PowerShell to get it done.

Remember you have the credentials of your DNS provider before beginning the entire process, and if you are not able to see the DKIM keys added under DNS management, wait for another day before trying again.

In case you want to manage a mailbox, distribution groups, calendar & contact items, or permissions, the Exchange Online PowerShell module is helpful.

Need help with the steps to set up DKIM on Office 365? Feel free to mention your queries in the comments section below.

More about the topics: Microsoft 365, Office 365

User forum

0 messages