main logo

How to Connect Your Custom Domain to Microsoft 365: A Step-by-Step Guide

Connect Your Custom Domain to Microsoft 365

Setting up a custom domain in Microsoft 365 will go a long way in adding to the professional look and feel of an organization. If you have bought a domain from a third-party hosting service, you can set it up with Microsoft 365 by changing your DNS records. This tutorial will take you through each step so that the connection is smooth and seamless.

Why Connect Your Custom Domain to Microsoft 365?

By setting up your domain, you will be able to use professional email addresses-most commonly user@yourdomain.com-and also access other Microsoft 365 services under the branding of your domain name. By default, until you set up a custom domain, your users will be using an onmicrosoft.com domain.

Key Benefits:

  1. Increased Professionalism: Branded emails lend greater credence to your organization.
  1. Simplified User Management: You can add the domain before creating user accounts to avoid reconfigurations.

If you have already created users in the default domain, then you can change users’ email addresses in the Microsoft 365 Admin Center.

Step 1: Verifying Your Domain Ownership with a TXT or MX Record

The first step to linking your domain is verifying that you own it.

Option 1: Verify with a TXT Record (Recommended)

  1. Sign in to the Microsoft 365 admin center and navigate to Settings > Domains.
  1. Type the name of the domain you want to add to the M365 tenant and click the ‘Use this domain’ button.
  1. Open a new tab, log into your DNS hosting provider’s site, and locate the DNS settings (like Zone File Settings or DNS Manager).
  1. Add the TXT record shown in the Microsoft 365 admin center to your domain. For example:
    • TXT Name: @
    • TXT Value: MS=ms######## (unique ID from the admin center)
    • TTL: 3600 (or default setting)
  1. Save the record, go back to the Microsoft 365 admin center, and click Verify. Verification may take up to 15 minutes, so be patient if it doesn’t work right away.

Option 2: Verify with an MX Record (If TXT Not Supported)

  1. In the Microsoft 365 admin center, go to Settings > Domains.
  2. On your DNS hosting site, locate the DNS settings.
  3. Add an MX record with the following details:
    • Record Type: MX
    • Priority: High value
    • Host Name: @
    • Points to Address: Copy from the admin center
    • TTL: 3600
  4. Make sure this MX record has the highest priority, then click Verify. You can delete this record once verification is complete.

Step 2: Adding DNS Records for Microsoft 365 Services

After verification, it’s time to add DNS records to enable Microsoft 365 services such as email, Teams, and Skype for Business.

Adding an MX Record for Email

  1. Before setting up the MX record, ensure users have accounts in the admin center to prevent any email disruption.
  2. In your DNS manager, add an MX record with:
    • Record Type: MX
    • Priority: Highest available, typically 0
    • Host Name: @
    • Points to Address: Copied from the admin center
    • TTL: 3600
  1. Save this MX record and delete any existing MX records to avoid conflicts.

Adding CNAME Records for Additional Services (Teams, Exchange Online, MDM)

  1. In your DNS manager, add CNAME records based on the admin center’s setup wizard.
  2. Ensure each CNAME record has:
    • Record Type: CNAME (Alias)
    • Host: Copy from the admin center
    • Points to Address: Paste the value provided
    • TTL: 3600

Adding or Editing SPF TXT Record for Email Authentication

  1. Locate the SPF record in your DNS manager. If one exists, update it with Microsoft 365’s values.
  1. Set fields as follows:
    • Record Type: TXT
    • Host: @
    • TXT Value: v=spf1 include:spf.protection.outlook.com -all
    • TTL: 3600
  1. Validate the SPF record with an SPF validation tool to prevent email spoofing. Consider also setting up DKIM and DMARC to bolster email security.

Adding SRV Records for Communications Services (Teams, Skype for Business)

  1. To support Teams and Skype, add SRV records in your DNS manager.
  1. Set fields like so:
    • Record Type: SRV
    • Name: @
    • Target: Value from admin center
    • Protocol, Service, Priority, Weight, and Port: Follow values provided in the admin center.
    • TTL: 3600
  1. If your provider restricts certain fields, see below for workarounds.

SRV Record Field Restrictions and Workarounds

Some DNS providers may impose restrictions on certain fields within an SRV record. If you encounter these limitations, here’s how to proceed:

  • Name Field: If @ is not allowed, leave the field blank.
  • Service and Protocol: If separate fields for Service and Protocol are not available, combine them into a single string (e.g., _sip._tls).
  • Priority, Weight, and Port: If these fields are limited, include them in the Target field, separated by spaces (e.g., 100 1 443 sipdir.online.lync.com).

Conclusion

By following this guide, you’ll successfully connect your custom domain to Microsoft 365. The screenshot below shows the domain name used in the example connected successfully.

This integration not only enhances your brand’s professionalism but also unlocks a wide range of Microsoft services. For expert assistance with domain integration or any Microsoft 365 configurations, reach out to the Medha Cloud Technical Support Team. Our certified professionals are ready to guide you every step of the way and ensure your setup is seamless and efficient. We’ll be glad to help you unlock the full potential of Microsoft 365 for your organization.

Benjamin Gbolaru
Benjamin Gbolaru
I'm Benjamin, a Microsoft 365 Specialist, helping small and large businesses deploy, configure, and secure M365 environments to maximize the benefits of Microsoft tools. With sound expertise in driving cloud adoption, identity and access management (IAM), security monitoring, system reliability, and proactive troubleshooting.
Share
Contents

Related Articles

medhacloud logo
USA:
Medha Cloud Solutions LLC
30 N Gould St Ste R, Sheridan, WY 82801,
Phone: +1 646 775 2855

India:
Medha Cloud Solutions Private Limited
#74, 7th Cross, Krishna Garden InCity Layout. Chikka Kammanahalli, Banneraghatta Road, Bangalore 560083
Phone:+91 93536 44646

E-Mail: sales@medhahosting.com
©Medha Cloud 2024. All rights reserved.