How to add custom domain to Office 365

How-to-add-custom-domain-to-Office-365

When you migrate all your IT infrastructure with all the emails and documents to Office 365 you should notify all your users about their new Office 365 email domain names, and this is where a problem may lie. Data migration always comes together with the risk to lose or to forget something on the way. But you should never forget about the users and you should specifically tell them what new address they are to use.

Office 365 offers you its own different domain names like login.microsoftonline.com and portal.microsoftonline.com. Open any of these and you will be transferred to the Office 365 dashboard where you can get access to all the Office365 applications. But the users will still have to use the Outlook link in their dashboards to get access to their emails. How can you make their life easier?

If your tenant is set up with ADFS you would need the address like outlook.com/yourcompanydomain.com. You can automatically log in to your Outlook email with your domain credentials that allow you to get access to the dashboard with single sign-on to your O365. But if you set up Office 365 custom domain you can only sign in with a local web server that will redirect you to the right page.

So what should we do then? Do not worry, you don’t need to create your own web server to set up the redirect function. There is an easy way around. You can use DNS for creating a CNAME that would lead to mail.office365.com. This CNAME should be something like mail.yourdomain.com. This action will help your users to access the login screen to log on directly to the Outlook page.

You can create the CNAME with Powershell cmdlets for DNS that was first applied in Windows Server 2012:

Add-DnsServerResourceRecordCName -HostNameAlias mail.office365.com -Name mail -ZoneName mydomain.com

If you use ADFS then your users have to check the “Keep me signed in” checkbox to be able to use single-sign-on function.

You should also take care of your Office 365 security and do regular cloud-to-cloud Office 365 backups to make sure that your data is safe.