Configure a custom domain in Office 365

In this article, I’ll demonstrate how to configure a custom domain for Office 365. If you’ve recently registered for Microsoft 365, then you will want to register your company’s domain name with the service.

This will allow you to create login identities that use your company domain name, like rather than the default format.

As well as making sure your company is on-brand when communicating with others, it’s also a key pre-requisite if you are planning to synchronise your local Active Directory and to migrate email.

If you currently host your email service elsewhere, this is a process that should be considered carefully, as you will not usually want to migrate your MX (mail exchanger) DNS records to Office 365 until you’ve migrated email across, or configured Exchange Hybrid.

To configure a custom domain, navigate to the Microsoft 365 admin center after logging into the service as an administrator. You’ll find the link in the waffle menu in the top left as Admin:

Microsoft 365 Admin Center

Next, expand the left-hand menu under Settings and choose Domains (A). You will see the default domain listed. Choose Add Domain (B):

Add Custom Domain for Office 365

In the add domain wizard, enter your company’s domain name, then choose Use this domain.

Add a custom domain for Office 365

Before your domain is confirmed within Microsoft 365, you’ll need to verify you own the domain. The easiest way is to use a DNS TXT (text) record. This will be added into your DNS control panel in addition to any other existing TXT records and is in the format MS=ms123456789.

If you aren’t sure how to add this to your DNS provider, choose the Step-by-step instructions link which will provide a Microsoft guide specific to your DNS provider.

Verify your domain

After this step is complete, your domain is verified with Microsoft 365. You can choose to close the wizard at this point.

If you want to add additional records, such as those to allow Microsoft Teams chats with external people – or if you don’t have an existing email provider and want to receive mail at Microsoft 365 now, then you will want to choose Continue to activate relevant DNS records.

Below we’ll choose Continue with a plan to add Microsoft Teams-specific records:

Activate records

On the Add DNS records page, we’ll select Microsoft Teams and Skype for Business. This will show the specific DNS records we need to add. Much like if you have an email server you will not add MX records, the same applies here if you run Skype for Business Server or Lync Server on-premises – only consider adding the records if none exist.

Add DNS records

In our example DNS control panel the records added look similar to below, with records to support the communication with Skype for Business Online federated users (known as external users in Microsoft Teams):

Custom Domain for Office 365

When these DNS records have been successfully added, we’ll choose Continue. This will take us to the last page of the wizard.

Domain Setup is complete

After choosing Done, the custom domain will be added to your Office 365 tenant. If it’s the first custom domain, it will be set as your default domain.

About the Author

Steve Goodman

Technology Writer and Chief Editor for AV Content at Practical 365, focused on Microsoft 365. A 12-time Microsoft MVP, author of several technology books and regular Microsoft conference speaker. Steve works at Advania in the UK as Field Chief Technology Officer, advising business and IT on the best way to get the most from Microsoft Cloud technology.


  1. Bangon Kali

    Hello is there a way to associate a custom domain to a particular sharepoint site?

Leave a Reply