Learn how to remove a domain from your Office 365 tenant with this practical guide. Understand the steps, common challenges, and best practices for a smooth domain removal process.
Step-by-step guide to removing a domain from your Office 365 tenant

Understanding domain management in Office 365

What is domain management in Office 365?

Domain management in Office 365 is about controlling and organizing the domains connected to your Microsoft 365 subscription. A domain is the part of your email address that comes after the @ symbol, like yourcompany.com. When you add a custom domain to your tenant, it lets your users have professional email addresses and access to Microsoft services using your company’s identity.

Why is domain management important for your organization?

Managing domains in Office 365 is essential for several reasons:

  • It ensures that your users have consistent, branded email addresses.
  • It helps you control access to Microsoft services and resources.
  • It allows you to update DNS records, set up security features, and manage user accounts efficiently from the Microsoft admin center.
  • It supports the process of moving users or groups between domains, or removing a custom domain when your organization’s needs change.

How does domain management work in the Microsoft admin center?

The Microsoft admin center is the main hub for domain management. Here, admins can add, verify, update, or remove domains. You can also manage DNS records, set up email addresses, and handle user accounts linked to each domain. For more advanced tasks, such as bulk updates or automation, PowerShell is often used to write host commands, update mguser properties, or move groups and users between domains.

Key concepts: domains, DNS, and user accounts

  • Domains: These are the unique names that identify your organization online. You can add multiple custom domains to your Office 365 tenant.
  • DNS records: These are settings at your DNS host that connect your domain to Microsoft services. Updating DNS records is required when you add or remove a domain from Microsoft 365.
  • User accounts and groups: Each user or group is associated with a domain. Before you remove a domain, you need to move users and groups to another domain and update their email addresses.

Domain management is a core part of keeping your Office 365 environment organized and secure. It also plays a role in larger workplace technology trends, such as those discussed in this article on how procurement BPO firms are transforming workplace technology.

Reasons for removing a domain from your tenant

Why organizations decide to remove a domain

There are several practical reasons why an organization might need to remove a domain from its Office 365 tenant. Understanding these scenarios helps admins make informed decisions and avoid disruptions to users and services.

  • Company rebranding or mergers: When a business changes its name, merges, or is acquired, the existing custom domain may no longer reflect the organization’s identity. Removing the old domain and adding a new one ensures consistency across email addresses and user accounts.
  • Subscription or licensing changes: If your organization is moving to a different Microsoft 365 subscription or consolidating tenants, you may need to remove a domain from one tenant before adding it to another. This is a common step during tenant-to-tenant migrations.
  • Domain no longer in use: Sometimes, a domain is added for a temporary project or a specific group. Once the project ends or the group is dissolved, keeping the domain can create confusion or unnecessary admin overhead.
  • Security and compliance: Removing unused or compromised domains helps reduce the attack surface and ensures compliance with internal or regulatory requirements. This is especially important if DNS records or nameserver records are no longer under your control.
  • DNS management and consolidation: Managing multiple domains and DNS records can be complex. Removing domains that are no longer needed simplifies DNS host management and reduces the risk of misconfiguration.

Impacts to consider before removing a domain

Before you remove a custom domain from Microsoft 365, it’s important to assess the impact on users, groups, and services. User accounts, email addresses, and groups domain associations may need to be updated. If users or groups are still using the domain, the removal process will not complete until all dependencies are resolved. This includes updating mguser properties, moving users to a different domain, and ensuring that all DNS records are updated or deleted as needed.

For organizations planning a domain move or tenant migration, careful preparation is key. Admins should review all user accounts, shared mailboxes, and groups to ensure no lingering references to the domain remain. Powershell scripts can help automate checks and updates, but manual review in the Microsoft admin center is often necessary for complex environments.

For a deeper look at how procurement transformation can impact your work tech strategy, check out this analysis of OEM procurement transformation in work tech.

Preparing your Office 365 tenant for domain removal

Checklist before starting the domain removal process

Before you remove a custom domain from your Microsoft Office 365 tenant, it’s important to prepare your environment to avoid interruptions for users and services. This preparation phase helps ensure a smooth transition and minimizes the risk of errors or downtime.

  • Update user accounts and email addresses: Make sure no user account is still using the domain you want to remove. Check both primary and alias email addresses. Update each account to use another verified domain. This step is crucial for all users, including shared mailboxes and service accounts.
  • Move groups and distribution lists: Review all groups, Microsoft 365 groups, and distribution lists. Change their email addresses if they reference the domain you plan to remove. The Microsoft admin center can help you identify these groups and update their addresses efficiently.
  • Check admin roles and subscriptions: Ensure that no admin account or subscription is tied to the domain. If any admin account uses the domain, update it to a different domain before proceeding.
  • Review DNS records and DNS host settings: Remove or update DNS records associated with the domain from your DNS host. This includes MX, CNAME, TXT, and nameserver records. Keeping old records may cause mail flow or service issues.
  • PowerShell and advanced checks: For larger tenants, consider using PowerShell scripts to identify lingering references to the domain. Commands like Get-MsolUser or Get-Recipient can help you find accounts or groups still using the domain. The Set-MsolUserPrincipalName command is useful for bulk updates.
  • Update mguser and service connections: If you use custom integrations or automated processes (like update mguser scripts), make sure they are not configured to use the domain you want to remove.

Once you’ve completed these checks, you can proceed to the domain removal steps in the admin center or via PowerShell. Skipping these preparations can result in errors or failed domain remove attempts. For more on how dashboards and business insights can support your domain management strategy, see this guide to ERP dashboard sales and business insights.

Step-by-step process to remove a domain from Office 365

Accessing the Microsoft 365 admin center

Start by signing in to the Microsoft 365 admin center using your admin account. Only users with the right permissions can remove a domain from Microsoft 365. Once logged in, go to Settings > Domains. Here, you’ll see a list of all domains connected to your tenant, including any custom domains.

Checking for dependencies before removal

Before you can remove a domain, Microsoft requires that no user accounts, groups, or email addresses are still using the domain. This includes checking for:

  • Users with email addresses using the domain
  • Groups or distribution lists assigned to the domain
  • Any Microsoft 365 subscription services linked to the domain

Update or move users and groups to another domain, such as the default onmicrosoft.com domain. You can do this in the admin center or with PowerShell using the Set-MsolUserPrincipalName command. For groups, use the Set-UnifiedGroup command to update their email addresses.

Removing DNS records and updating your DNS host

After moving all users and groups, go to your DNS host and remove any DNS records related to the domain, such as MX, CNAME, and TXT records. This step is important to avoid mail flow or service issues. If you manage DNS from Microsoft, you can update or remove records directly in the admin center.

Initiating the domain removal process

Back in the admin center, select the domain you want to remove. Click Remove domain. Microsoft will run a check to ensure no dependencies remain. If any are found, you’ll see a list of items to update or move. Once all dependencies are cleared, confirm the removal. The domain will be removed from your tenant, and you can use it elsewhere or with another Microsoft 365 tenant if needed.

Using PowerShell for advanced scenarios

If you prefer automation or need to remove domains in bulk, use PowerShell. Connect to Microsoft 365 with the Connect-MsolService command, then use Remove-MsolDomain -DomainName <yourdomain.com>. PowerShell will also check for dependencies and prompt you to resolve them before completing the domain remove process.

Troubleshooting common issues during domain removal

What to do when a domain won’t remove

If you’re stuck trying to remove a domain from your Office 365 tenant, you’re not alone. Sometimes, even after following the standard steps, Microsoft won’t let you remove the custom domain. Here are some common blockers and how to resolve them:
  • Active users or groups: Check if any user accounts or groups are still assigned to the domain you want to remove. You’ll need to update each user’s email address and move groups to another domain before proceeding. Use the Microsoft admin center or PowerShell commands like Set-MsolUserPrincipalName to update user accounts.
  • Domain still set as default: If the domain is set as the default for your tenant, switch the default to another domain from the admin center before attempting removal.
  • DNS records still active: Make sure you’ve deleted all DNS records related to the domain from your DNS host. This includes MX, CNAME, and nameserver records. If you’re using a custom DNS provider, double-check the records there.
  • Subscriptions or licenses: Sometimes, a subscription or service is still linked to the domain. Review your subscriptions in the admin center and update any references to the domain.

Using PowerShell for stubborn domains

If the admin center isn’t letting you remove the domain, PowerShell can help. Use the Remove-MsolDomain command to force the removal. Before running this, ensure all user accounts, groups, and email addresses have been updated. If you see errors, the output will usually tell you what’s blocking the process, such as lingering user accounts or groups domain references.

Common error messages and fixes

Error Message What it Means How to Fix
"Cannot remove domain because it is in use by user accounts" Some users still have email addresses or logins with the domain Update user accounts to use another domain
"Domain is set as default" The domain is the default for your tenant Set another domain as default in the admin center
"Domain is referenced by groups" Groups are still using the domain Move groups to another domain and update their email addresses
"DNS records still exist" DNS records for the domain are still active Remove all related DNS records from your DNS host

Tips for a smooth domain remove process

  • Double-check all user and group assignments before starting the domain move.
  • Use PowerShell to quickly list and update users or groups associated with the domain.
  • After removal, update mguser and other admin accounts to ensure no lingering references to the old domain.
  • Allow some time for DNS changes to propagate before retrying the removal from Microsoft admin center.

Best practices for managing domains in Office 365

Keep your domain environment organized

Managing domains in Office 365 is not just about adding or removing them. It’s about keeping your environment clean and secure. Regularly review your list of domains in the Microsoft admin center. Remove custom domains that are no longer in use, and make sure all DNS records are up to date with your DNS host. This helps avoid conflicts and ensures email and services run smoothly.

Monitor user accounts and email addresses

Before you move users or groups from one domain to another, check that all user accounts and email addresses are correctly updated. If you plan to remove a domain, verify that no user or group is still using it for their sign-in or email. Use PowerShell or the admin center to list accounts linked to a domain. Update mguser and group settings as needed to prevent issues during a domain move or removal.

Stay on top of DNS and nameserver records

DNS records are critical for Microsoft 365 services. After you remove a domain from Microsoft, double-check that you also update or delete the related DNS and nameserver records at your DNS host. This avoids confusion and potential security risks. Always document any changes you make to DNS records for future reference.

Plan for subscription and service impacts

Removing a domain can affect subscriptions, licenses, and connected services. Before you remove a custom domain, review which services rely on it. Make sure to move groups and users to a different domain if needed. This helps maintain access and avoids service interruptions.
  • Review domains regularly in the admin center
  • Update user and group email addresses before a domain move
  • Remove unused custom domains to reduce clutter
  • Check and update DNS records after domain removal
  • Document all changes for compliance and troubleshooting

Use automation and PowerShell for efficiency

For larger organizations, PowerShell scripts can help automate domain management tasks. Use them to set or update user accounts, move groups, or remove domains efficiently. Automation reduces manual errors and saves time, especially when handling multiple domains or large user bases.
Share this page
Published on
Share this page

Summarize with

Most popular



Also read










Articles by date