When you sign up for Office 365, you’re given an initial domain name that looks like contoso.onmicrosoft.com. The domain name is part of your user ID, like firstname.lastname@example.org, and you can use the domain to try out Office 365 services. Or you can use a custom domain name for user ID, and email and other services.
You can add a custom domain, but you can’t rename the initial domains. For example, if the initial domain you chose during Office 365 signup was fourthcoffee.onmicrosoft.com, you can’t change it to be fabrikam.onmicrosoft.com. To use a different onmicrosoft.com, you’d have to open a new account with Office 365. And, unfortunately, you can't use your custom domain for team site addresses.
Use your own domain with Office 365
To use your own domain with Office 365, instead of the onmicrosoft.com domain that you were given at signup, add your domain to Office 365 following the steps in the domains setup wizard. After Office 365 confirms that you own the domain, you can use user IDs and email addresses, like email@example.com instead of firstname.lastname@example.org. Learn more about setting up and managing your domain with Office 365.
You can continue to use your onmicrosoft.com and public.sharepoint.com domains if you like, even after you add your own domain name to Office 365, and email still works with your onmicrosoft.com domain.
Consider the following before you set up your own domain to use with Office 365.
You must own a domain before you can set it up in Office 365. If you don’t yet own the domain that you want to add, you can register the domain at a domain name registrar.
You can add a domain with any name that is currently available. The name doesn’t have to match the first part of your onmicrosoft.com domain. For example, if your onmicrosoft.com domain was named fourthcoffee.onmicrosoft.com, you could add a custom domain named fourthcoffee_NW.com.
You can’t add a domain that you’re already using in another Microsoft cloud service.
Before you can confirm to Office 365 that you own a domain, you must have the sign-in credentials for your domain registrar or DNS hosting provider. If you don’t remember where your DNS records are hosted, you can learn more about finding your domain registrar or DNS hosting provider.
When you change your domain's email to come to Office 365, by updating your domain's MX record during setup, ALL email sent to that domain will start coming to Office 365. Make sure you've added users and created mailboxes in Office 365 for everyone who has email on your domain BEFORE you change the MX record.
Tip: Don't want to move email for everyone on your domain to Office 365? You can take steps to pilot Office 365 with just a few email addresses instead.