> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.elitehost.co.za/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# How do I connect my domain email to Microsoft 365?

In this article, we will guide you through configuring your domain’s DNS records in cPanel to connect your email to Microsoft 365 (Office 365). Since these DNS records are account-specific, you’ll need to retrieve them from your Microsoft 365 account.

# Verifying your domain with Microsoft 365

Before setting up DNS records in cPanel, you need to verify your domain in Microsoft 365. Follow these steps:

1. **Log in to your Office 365 account**.
2. Navigate to **Setup > Domains**.
3. Select the domain you want to connect and click **Start Setup**. This will display the verification details.
4. Go to the **Verify Domain** page.
5. Choose **Add a TXT record instead** and click **Next**.
6. Copy the TXT value displayed, which should look like MS=msXXXXXXXX.

**Adding the TXT Record in cPanel**

1. Log in to **cPanel**.
2. Navigate to **Zone Editor** under the **Domains** section.
3. Click **Manage** next to your domain.
4. Add a **TXT record** with the copied value from Microsoft 365.
5. Return to your Microsoft 365 account and verify the domain.

# Pointing DNS records to Microsoft 365

After verifying your domain, retrieve the necessary DNS records for configuration:

1. Log in to your **Microsoft 365 account**.
2. Go to **Setup > Domains**.
3. Select your verified domain.
4. In the **Required DNS Settings** section, locate the DNS records you need to configure in cPanel.

**1) Modify the MX Record**

To ensure uninterrupted email delivery, create your email accounts in the Microsoft 365 admin center before modifying the MX record.

1. Log in to **Microsoft 365 admin center** and navigate to **Settings > Domains**.
2. Select your domain, click **Manage DNS**, and choose **Add your own DNS** to view the required DNS records.
3. Log in to **cPanel** and open the **Zone Editor**.
4. Click **Manage** next to your domain.
5. Filter by **MX** and click **Edit** next to the current record.
6. **Replace the existing MX record** with the one from Microsoft 365 (e.g., exampledomain-co-za.mail.protection.outlook.com).
7. Click **Save Record**.

**2) Modify the SPF Record**

1. In the **Zone Editor**, filter by **TXT**.
2. Locate the SPF record (starts with v=spf1) and click **Edit**.
3. Add the Microsoft SPF include value: `include:spf.protection.outlook.com`

Example: `v=spf1 +a +mx include:spf.zamailgate.com include:spf.protection.outlook.com -all` 

4. Click **Save Record**.

**3) Modify the Autodiscover Record**

1. In the **Zone Editor**, filter by **All **and search for `autodiscover`
2. **Delete the SRV** record that starts with `_autodiscover._tcp`
3. Edit the **autodiscover** A record and replace it with `autodiscover.outlook.com`
4. Click **Save Record**.

4) **Set Email Routing to Remote**

The last step is to ensure that the Email Routing is set to Remote.  
  
1. Go back to the **cPanel main page**.
2. Search for the **Email Routing** icon under the **Email** section.
3. **Select your domain** from the dropdown menu at the top.
4. Click **Remote Mail Exchanger** under the **Configure Email Routing** section.
5. Click **Change** to save your settings.

Once all DNS records have been updated in cPanel, allow up to 48 hours for DNS propagation. After propagation, your domain email should successfully connect to Microsoft 365.

If you need assistance with any of these steps, feel free to reach out to our [support team](https://my.elitehost.co.za/submitticket.php?step=2&deptid=14) or email helpdesk@elitehost.co.za