Overview

This guide walks you through removing existing MX records in cPanel and configuring your domain to route email through Microsoft 365 (Outlook 365). Follow each step carefully. DNS changes can take up to 24-48 hours to propagate, though most updates take effect within 1 hour.

Before you begin:

  • Confirm your Microsoft 365 tenant is provisioned and your domain has been added and verified in the Microsoft 365 Admin Center.
  • Ensure no active mail is being delivered to the existing cPanel mailboxes (or migrate mail first using IMAP migration tools).
  • Have your cPanel login credentials ready.

Step 1 - Log In to cPanel

  1. Go to https://yourdomain.com:2083 (replace yourdomain.com with your domain).
  2. Enter your cPanel username and password.
  3. Click Log in.

Step 2 - Open the Zone Editor

  1. In the cPanel home screen, scroll to the Domains section.
  2. Click Zone Editor.
  3. Find your domain in the list and click Manage.

Step 3 - Delete the Existing MX Record

  1. Use the Filter dropdown and select MX to display only MX records.
  2. Locate the current MX entry (commonly yourdomain.com pointing to mail.yourdomain.com).
  3. Click the Delete button next to the record.
  4. Confirm the deletion in the popup window.
  5. Repeat for any additional MX records until no MX records remain.

Important: Also disable local mail handling so cPanel does not try to deliver mail internally. See Step 6.

Step 4 - Add the Microsoft 365 MX Record

Microsoft 365 provides a single MX target per tenant. You can find the exact value in the Microsoft 365 Admin Center under Settings > Domains > Your Domain > DNS Records. It looks like:

yourdomain-com.mail.protection.outlook.com

  1. In the cPanel Zone Editor, click + Add Record and choose Add MX Record.
  2. Fill in the fields as follows:
    • Name: yourdomain.com.
    • TTL: 3600
    • Type: MX
    • Priority: 0
    • Destination: yourdomain-com.mail.protection.outlook.com
  3. Click Add Record to save.

Step 5 - Add Supporting DNS Records for Microsoft 365

Add the following records (values are supplied by the Microsoft 365 Admin Center):

  • Autodiscover (CNAME): autodiscover -> autodiscover.outlook.com
  • SPF (TXT): v=spf1 include:spf.protection.outlook.com -all
  • DKIM (CNAMEs): selector1._domainkey and selector2._domainkey (values provided in Microsoft 365 Admin Center)
  • DMARC (TXT, optional but recommended): v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com

Step 6 - Disable Local Mail Exchanger in cPanel

  1. Return to the cPanel home screen.
  2. Under Email, click Email Routing.
  3. Select your domain.
  4. Choose Remote Mail Exchanger.
  5. Click Change.

This tells cPanel not to attempt local delivery and forces it to honour the external MX record.

Step 7 - Verify in Microsoft 365

  1. Log in to the Microsoft 365 Admin Center.
  2. Go to Settings > Domains, select your domain, and click Check DNS.
  3. Once all records show a green tick, your domain is live on Microsoft 365.

Step 8 - Test Mail Flow

  • Send a test email from an external account (Gmail, Yahoo, etc.) to a Microsoft 365 mailbox on your domain.
  • Send an outbound email from the Microsoft 365 mailbox to verify sending works.
  • Check the message headers to confirm delivery through *.protection.outlook.com.

Troubleshooting

  • Mail still bounces locally: Email Routing is still set to Local. Re-check Step 6.
  • Old MX still showing: DNS propagation may take up to 48 hours. Use dig mx yourdomain.com or MXToolbox to verify.
  • SPF failures: Ensure only one SPF TXT record exists on the domain.

If you need further assistance, please open a support ticket and our team will assist.

Je li Vam ovaj odgovor pomogao? 0 Korisnici koji smatraju članak korisnim (0 Glasovi)