In this tutorial, I will show you how to add a new domain to Office 365 Hybrid configuration. The new domain will be used as the new UPN (User Principal Name) and a reply address for all users in the organization. This is usually done when the business changes it name or the company gets acquired by another company. We will start by adding the domain to Office 365 and then to the on-prem configuration. We will also need to run the Hybrid Configuration wizard to configure the mailflow connectors.
- Adding the new domain to Office 365
- Logon to Office 365 admin center
- Navigate to Settings -> Domains and click on Add domain
- Enter the name of your new domain, click Use this domain and follow the steps to verify the new domain
You would need access to your domain provider (GoDaddy or other). I usually choose the option to add a TXT record to verify the domain.
After the verification, the domain is added to Office 365. You can now add the other DNS records, like the MX, SPF, and CNAME. Depending on your configuration your MX record should point to Office 365 or a third-party spam filter like FireEye.
2. Adding the new domain to the On-Prem Exchange
- Open your on-prem Exchange Admin Center and go to mailflow and choose the accepted domains tab
- Click on the plus sign “+” to add the new domain
- Enter the name of the new domain and click Save
We added the domain to on-prem Exchange. We can now run the Office 365 Hybrid Configuration wizard
Note: You can download the wizard from the Hybrid tab in Office 365. At the time of the writing, you must use Internet Explorer or Edge to download the wizard or you wouldn’t be able to install it on your machine.
- Install your machine
- Open the Wizzard and enter your administrator credentials for both on-prem and Office 365
- On the Hybrid Domains screen select the new domain
- Go thought the rest of the steps and keep all settings the same.
The wizard will upgrade your existing configuration and it will add the new domain to the mail flow connector between your Exchange Server and Exchange Online.
Now the domain can be added to the mailboxes. You can do this manually or configure the email address policy on your on-prem server. The policy will add the new domain to all users or a specific group.
You will also need to add the new domain as a new User Principal Name (UPN) in Active Directory. You can see how here. The UPN is used to login to all Office 365 applications. You can see how to change the UPN for all users in AD with PowerShell here. Once you change the UPN the users will need to sign in with the new domain.