Identity and governanceTenant and identityIntermediate23 min read

What Does Custom domain Mean?

Reviewed byJohnson Ajibi· Senior Network & Security Engineer · MSc IT Security
On This Page

Quick Definition

A custom domain is your own unique web address, such as yourcompany.com, that you can connect to services like Microsoft 365 or Azure. It replaces the default address that Microsoft gives you (like contoso.onmicrosoft.com). This makes your login and email look professional and branded. You must verify you own the domain before you can use it.

Commonly Confused With

Custom domainvsDefault domain (onmicrosoft.com)

The default domain is automatically created when you provision a new tenant. It cannot be removed and is always present as a fallback. A custom domain is one you own and add manually. The default domain is used for initial user accounts, but for professional use, you replace it with a custom domain.

Contoso.onmicrosoft.com is the default domain; contoso.com is a custom domain.

Custom domainvsVerified domain vs. Unverified domain

A verified domain is one where you have successfully completed the DNS verification process. An unverified domain is one you have added but not yet proven ownership. Only verified domains can be used for user accounts and services. Unverified domains appear in the list but cannot be selected for UPNs or email.

If you add your domain but forget to verify, it will remain as Unverified and users cannot sign in with it.

Custom domainvsDNS zone vs. Custom domain

A DNS zone is a container for all DNS records for a domain. A custom domain is just the name you own. The zone holds records like TXT, MX, and CNAME that you manage to make services work. The custom domain is the label, while the DNS zone is the collection of settings that direct internet traffic.

Custom domain: mycompany.com. DNS zone: the file on your DNS host that contains the TXT verification record, mail exchange record, etc.

Custom domainvsPrimary domain

The primary domain is the default domain used for new user creation in the admin center. You can set a custom domain as the primary domain, but it must be verified first. The default onmicrosoft.com domain can also be primary, but using a custom domain is recommended. Changing the primary domain does not delete the old default.

If you set contoso.com as the primary domain, new users get UPNs like newuser@contoso.com by default.

Must Know for Exams

Both MS-102 and AZ-104 heavily test custom domain concepts, though in slightly different contexts. For MS-102 (Microsoft 365 Administrator), custom domains appear in the Manage tenants and identity domain objectives. You need to know how to add, verify, and manage domains in the Microsoft 365 admin center. Expect scenario-based questions where you are given a company with multiple domains (like contoso.com and contoso.co.uk) and asked to add them to a tenant, set the primary domain, and configure email routing. The exam also tests domain removal: you must understand that you cannot delete a domain that is still assigned to users or groups. A typical question might describe an admin trying to remove a domain and encountering an error, then ask you to identify the cause.

For AZ-104 (Azure Administrator), custom domains are part of managing Azure AD identities. The exam objectives include configuring custom domains and managing user accounts. You will see questions about verifying a custom domain using a TXT record, the difference between verified and unverified domains, and how custom domains affect user creation. For instance, when you create a new user in Azure AD, you must select a domain that is already verified. If you try to create a user with an unverified domain, the operation fails. The exam also covers scenarios where you integrate on-premises AD with Azure AD using Azure AD Connect, where matching UPN suffixes are critical. A mismatch between the custom domain in Azure AD and the on-premises UPN suffix will cause synchronization errors.

In both exams, question types include multiple-choice, drag-and-drop (ordering the verification steps), and case studies. For example, a case study might describe a company that acquired another company and wants to merge domains, and you must determine the correct sequence of DNS changes, domain addition, and user migration. The tricky part is that DNS propagation takes time, so the correct answer often includes waiting for DNS record propagation before the domain can be verified. Learners often forget that verification is not instant and that they must wait for the DNS changes to propagate globally. Another common exam trap is that the domain must be removed from all users and groups before it can be deleted, and the default domain cannot be removed until another domain is set as the default. Mastering these details will help you secure full marks on domain-related questions.

Simple Meaning

Think of a custom domain like the nameplate on your office door. When you rent an office in a big building, the building management might give you a generic nameplate that just says Room 304. That works, but nobody knows who you are just by seeing Room 304. A custom domain is like having your own personalized nameplate engraved with Your Name and Your Job Title. When clients walk down the hall, they see your name and immediately know it’s you.

In the online world, Microsoft gives every tenant a default domain like yourcompany.onmicrosoft.com. That is functional, but it doesn’t look professional. If you own a website domain, like yourcompany.com, you can add that custom domain to your tenant. Then your login pages, email addresses, and other services can use yourcompany.com instead of the default one. This makes everything look clean and branded.

But you cannot just tell Microsoft you own that domain. You have to prove it. This is done by adding a special text record (like a TXT record or MX record) to your domain’s DNS settings. DNS is like a phonebook for the internet. By placing a secret code in that phonebook, Microsoft can look it up and confirm that you really control the domain. Once verified, you can set the custom domain as your primary domain or add more domains for different regions or brands.

Having a custom domain also helps with trust. When users see yourcompany.com in an email address or a login page, they know it’s authentic. Scammers often use generic or misspelled domains, so a clean custom domain is a sign of legitimacy. For IT professionals, understanding how to add, verify, and manage custom domains is a critical skill for identity and governance tasks.

Full Technical Definition

A custom domain in the context of Microsoft 365 and Azure Active Directory (Microsoft Entra ID) refers to a DNS domain name that you own and register with your cloud tenant, replacing or supplementing the initial onmicrosoft.com domain. When you create a tenant, Microsoft provision a default domain, such as contoso.onmicrosoft.com, which serves as the initial namespace for user principal names (UPNs) and email addresses. However, for production environments, you almost always want to use your own domain, like contoso.com, for user identities and services.

To use a custom domain, you must add it to the tenant and then verify ownership through DNS verification. The verification process typically involves adding a specific TXT record or MX record to the domain's DNS zone. Microsoft provides a unique verification string that you copy and paste into your DNS hosting provider’s management interface. Once the record is published and propagated across the internet, Microsoft queries the DNS and confirms that the record matches. This proves that you control the domain. After verification, you can set the custom domain as the default domain for new users, or you can use it for specific scenarios like email routing with Exchange Online.

In technical terms, when a user signs in with a UPN like admin@contoso.com, Azure AD first resolves the domain suffix. If the domain is verified and associated with the tenant, the authentication request is routed to the correct tenant. Custom domains also play a role in federated identity scenarios, where the domain’s DNS records may point to an external identity provider. For email, MX records direct incoming mail to your tenant. SPF, DKIM, and DMARC records further secure email delivery and reduce spoofing. IT professionals must manage DNS records carefully because misconfigured records can break email delivery, authentication, or domain verification.

Custom domains can be added in the Microsoft 365 admin center (Setup > Domains) or in Azure AD (Custom domain names). For Azure AD, you can also use PowerShell or Microsoft Graph API to programmatically manage domains. Each tenant can have up to 500 custom domains, though that limit may vary by subscription. Once added, domains are categorized as either verified or unverified. Only verified domains can be used for user accounts and services. It is also possible to use multiple custom domains for different business units, brands, or geographies. In hybrid deployments, custom domains must match the on-premises UPN suffixes for seamless synchronization with Azure AD Connect. Any mismatch will cause sync errors or authentication failures for federated users. Understanding custom domain management is essential for the MS-102 and AZ-104 exams, as questions often test the DNS verification flow, the impact on user creation, and troubleshooting domain issues.

Real-Life Example

Imagine you just moved into a new apartment building. The building manager gives you an apartment number and a mailbox labeled Apartment 7B. That works for getting mail, but when you order pizza or have packages delivered, the driver has to look up the apartment number on a directory. Your friends might also struggle to remember that you live in Apartment 7B, because it is just a number. Now, suppose you are allowed to install your own custom mailbox outside the building with your family name and a unique design. That is like a custom domain. Instead of saying I live in Apartment 7B, you tell people to send mail to The Johnson Family House. Delivery drivers see the name directly, no directory lookup needed.

In the online world, the apartment building is the cloud service provider (Microsoft), the default apartment number is the onmicrosoft.com domain, and your custom mailbox is your own domain name like johnsonfamily.com. To get that custom mailbox, you must prove to the building manager (Microsoft) that you actually own that mailbox. You do this by placing a secret code on the building directory (DNS). The building manager then checks the directory, sees the secret code, and says Yes, this person really does own that mailbox. Then you can use that mailbox for everything, like telling people to email you at dad@johnsonfamily.com instead of dad@apartment7B.apartmentbuilding.com.

If you ever want to change the design of your mailbox or move it to a different wall, you must update the directory record first. That is like updating DNS records when you change your domain’s settings. If you fail to update the directory, mail might still go to the old location. This is exactly what happens when you change email providers or authentication services without updating DNS. The analogy helps IT learners understand that verification and DNS management are not just optional steps, but core to how custom domains work in cloud identity systems.

Why This Term Matters

Custom domains matter because they are the public face of your organization in the cloud. When users sign in to Microsoft 365 or Azure, the domain in their username tells the authentication system where to route the request. If you use the default onmicrosoft.com domain, every user’s UPN will be something like jdoe@contoso.onmicrosoft.com. That looks unprofessional and can cause confusion, especially if your organization has multiple brands or if you are a service provider with many tenants. By using a custom domain, you present a consistent, branded identity to customers, partners, and employees.

From a technical and security perspective, custom domains are the foundation for many critical services. Email delivery depends on MX records pointing to your tenant. SPF and DKIM records prevent spoofing. Federated authentication with another identity provider requires the custom domain to be verified and configured correctly. If you neglect to add a custom domain or misconfigure the DNS records, you can break email, cause authentication failures, or even allow domain takeover attacks where an attacker verifies a domain you no longer control.

For IT administrators, managing custom domains is a daily task. You might need to add a new domain after a merger, remove a domain that is no longer used, or troubleshoot why users cannot sign in after a domain change. The process seems simple, but mistakes like forgetting to remove a domain from all users before deleting it, or using the wrong verification method (TXT vs MX), can lock you out of your own tenant. This is why exams like MS-102 and AZ-104 emphasize the verification flow and the importance of DNS records. A solid understanding of custom domains ensures that you can set up identity and governance correctly from the start, avoiding costly migrations later.

How It Appears in Exam Questions

Custom domain questions appear in multiple formats across the MS-102 and AZ-104 exams. One common pattern is a scenario question where you are given a fictional company, like Contoso Ltd., that has just subscribed to Microsoft 365. The company owns contoso.com and wants to use it for employee email and sign-ins. The question asks you to select the correct sequence of steps to add and verify the domain. The options might include steps like Add domain in admin center, Create user accounts, Add TXT record to DNS, Wait for propagation, Verify domain. You must order them correctly, usually starting with adding the domain, then adding the TXT record, waiting, then verifying.

Another pattern involves troubleshooting. For example, an admin reports that users cannot sign in with their custom domain, even though the domain shows as verified. The question might ask what is wrong. The answer could be that the domain is verified but not set as the default domain, or that DNS records (like CNAME or MX) are missing for other services. Alternatively, the admin might be attempting to delete the custom domain, but the delete button is grayed out. The correct answer is that the domain is still assigned to users, groups, or is the default domain.

In AZ-104, you might see a question about creating a new user with a custom domain. The scenario: an IT pro tries to create a user with UPN jdoe@contoso.com, but the domain contoso.com is not verified. The system returns an error. The answer is that you must first verify the domain by adding a TXT record, then wait for propagation, and only then can you create users with that domain. A variant question asks about the impact of removing a custom domain from the tenant without first unlinking it from users. This leads to user sign-in failures.

There are also comparison questions where you must choose between using the default domain or a custom domain for specific scenarios like federation. For example, if you want to set up federated identity with an on-premises AD FS, you need a custom domain. The exam might ask, Which domain type is required for federation? The answer: a custom domain verified in the tenant. These questions test not just recall but the ability to apply the concept in a real-world IT task. Practicing with step-by-step domain addition exercises in the Microsoft 365 test environment will prepare you for these questions.

Practise Custom domain Questions

Test your understanding with exam-style practice questions.

Practise

Example Scenario

You work as an IT administrator for a small company called Northwind Traders. Your company has just signed up for Microsoft 365 Business Premium. The tenant was created with the default domain northwindtraders.onmicrosoft.com. Your CEO, Alice Jones, wants her email to be alice@northwindtraders.com, because that is the domain you use on your business cards and website. Currently, her email is alice@northwindtraders.onmicrosoft.com, which looks unprofessional. She asks you to make it possible for everyone in the company to use @northwindtraders.com for sign-ins and email.

Your first step is to log into the Microsoft 365 admin center and navigate to Settings > Domains. You click Add domain and type northwindtraders.com. The system asks you to verify ownership. You see a unique TXT value, like MS=ms12345678. You then go to your domain registrar (where you bought the domain, like GoDaddy or Namecheap) and add a new TXT record. The record name is @ and the value is the string provided. You save the record and wait for DNS propagation, which can take anything from minutes to 72 hours, though it is usually faster.

After a few hours, you go back to the admin center and click Verify. The system confirms that the TXT record exists, so it marks northwindtraders.com as verified. Now the domain is ready. You go to the user management section, select Alice’s account, and change her UPN from alice@northwindtraders.onmicrosoft.com to alice@northwindtraders.com. You also set the primary email address to the new domain. After saving, Alice can now sign in with her new email address. You repeat this process for all other users. Finally, you may also want to set northwindtraders.com as the default domain so that new users automatically get the custom domain. This scenario directly mirrors what you would do in a real organization, and it is the kind of step-by-step task that appears in exam questions about custom domains.

Common Mistakes

Thinking you can use a custom domain without verifying it

Microsoft requires proof of ownership before using a domain for user accounts. Verification prevents unauthorized use of domains you do not own.

Always complete the DNS verification step by adding the TXT or MX record provided by the admin center. Wait for propagation, then verify.

Deleting a custom domain while users are still assigned to it

If users have UPNs or email addresses using that domain, deleting the domain will break their ability to sign in and send or receive email.

First, change all users' UPNs to another verified domain (like onmicrosoft.com). Remove the domain from all groups and services. Only then can you delete it.

Assuming DNS propagation happens instantly

DNS changes take time to propagate across the internet. Attempting to verify the domain immediately after adding the record will fail if the record hasn't been cached by Microsoft's DNS servers.

Wait at least 15–30 minutes, but up to 72 hours. Use online DNS lookup tools to confirm the record is visible before clicking Verify.

Using the wrong DNS record type for verification

Microsoft may provide a TXT record, but you might accidentally add an MX record or CNAME record instead. The verification will fail because the system checks for a specific record type and value.

Carefully read the instructions. Typically, it asks for a TXT record with the name @ or the domain name itself, and the exact value displayed. If you are unsure, follow a step-by-step guide.

Trying to remove the default onmicrosoft.com domain

The default domain cannot be deleted because it is the fallback domain for the tenant. You can change which domain is the default, but you cannot remove the onmicrosoft.com domain entirely.

Keep the default domain as a backup. If you need to change the default, go to Domains, select a custom domain, and set it as default. The original default will remain but will no longer be the primary.

Exam Trap — Don't Get Fooled

{"trap":"The exam might present a scenario where an admin adds a custom domain, configures it, and then tries to create a new user with that domain immediately after adding the TXT record, before verifying. The question asks: Why does the user creation fail?","why_learners_choose_it":"Learners often assume that once you add the domain and the DNS record, the system automatically accepts it.

They skip the explicit verification step or think that verification happens magically in the background.","how_to_avoid_it":"Always remember that adding a custom domain and adding a DNS record are only the first steps. You must explicitly click the Verify button in the admin center and wait for the system to confirm that the record exists.

The domain is not usable until Status shows Verified. In the exam, look for the phrase domain is not verified and recall that user creation requires a verified domain."

Step-by-Step Breakdown

1

Add the custom domain to the tenant

In the Microsoft 365 admin center or Azure AD, navigate to the domains section and click Add domain. Enter your domain name (e.g., contoso.com). The system will check if the domain is already in use by another tenant and then generate a verification record for you.

2

Obtain the verification record from Microsoft

After adding the domain, Microsoft provides a unique TXT record value (like MS=ms12345678) or an MX record. This record serves as a digital proof of ownership. Copy this value exactly as shown, including any dots or hyphens.

3

Add the verification record to your DNS host

Log in to your domain registrar or DNS hosting provider (e.g., GoDaddy, Cloudflare). Create a new TXT record with name @ (or blank, depending on provider) and paste the value from Microsoft. This record tells the world that you authorize Microsoft to use this domain.

4

Wait for DNS propagation

DNS records are not instant. Changes can take from a few minutes up to 72 hours to spread across the internet. During this time, the domain remains unverified. Use command-line tools like nslookup or online DNS checkers to confirm the record is publicly visible.

5

Verify the domain in the admin center

Return to the domains page and click the Verify button. Microsoft’s DNS servers will look for the TXT record you added. If found and the value matches, the domain status changes to Verified. If not, you may need to wait longer or check the record for typos.

6

Set the domain as default (optional) and assign to users

Once verified, you can set the custom domain as the default domain so new users automatically get addresses in that domain. Then update existing users' UPNs and primary email addresses to the custom domain. The domain is now fully operational.

Practical Mini-Lesson

Custom domains are the bridge between your organization’s identity and the cloud. As an IT professional, you will routinely add, verify, and manage custom domains for tenant onboarding, mergers, and rebranding. The process sounds simple, but there are several practical pitfalls that can cause outages if you do not handle them carefully.

First, always keep a record of your DNS settings before making changes. If you add a TXT record incorrectly, you could break email delivery or other services. Many admins have accidentally overwritten existing MX records when adding verification records. The fix is to carefully add the new record without deleting existing ones. If you are using a DNS provider that uses a wizard, double-check that you are not in a mode that replaces everything.

Second, understand the difference between domain verification and domain configuration for specific services. Verification only confirms ownership. Once verified, you still need to configure additional DNS records for email (MX, SPF, DKIM, DMARC), for Teams (SIP, CNAME records for meeting join), and for Mobile Device Management (CNAME for enrollment). A common mistake is to verify the domain but forget the MX record, so email to the custom domain bounces.

Third, when removing a domain from the tenant, you must first remove it from all users, groups, and services. In the admin center, you can run a report to see which users are still using the domain. Then change their UPN to another verified domain. If the domain is the default, set another domain as default first. After reassigning, wait for any synchronization (if using Azure AD Connect) and then remove the domain. If you remove it too quickly, users will lose access to services.

Fourth, for hybrid environments where you synchronize on-premises AD with Azure AD, the custom domain in the cloud must exactly match the UPN suffix used in the on-premises forest. If the on-premises user has UPN jdoe@contoso.local but the cloud custom domain is contoso.com, Azure AD Connect will fail synchronization. You must either add the custom domain as an alternative UPN suffix on-premises or change the user UPNs to match the cloud domain. This is a common pain point in migration projects.

Finally, when setting up federation with a custom domain, the TXT record for verification is different from the federation records. You first verify the domain with a TXT record, then you configure federation by adding additional DNS records pointing to the federation service. The exam often tests that verification must happen before federation configuration can begin. Keep this order in mind: add domain, verify, then configure services. Skipping verification will break federation setup.

Memory Tip

V.A.V., Verify After Value. Add the TXT record, Wait for Propagation, then Verify. If you Verify too early, it fails. Always check the DNS record value matches exactly.

Covered in These Exams

Current Exam Context

Current exam versions that test this topic — use these objectives when studying.

Related Glossary Terms

Frequently Asked Questions

Can I use a custom domain if I don't own it?

No. You must prove ownership by adding a specific DNS record. Microsoft will verify the record before allowing you to use the domain for services.

How long does DNS propagation take for a custom domain verification?

It varies. It can take from a few minutes to up to 72 hours, depending on your DNS host and TTL settings. Usually, it is completed within an hour.

Can I have more than one custom domain in my tenant?

Yes. You can add up to 500 custom domains in a single Microsoft 365 tenant, depending on your subscription. They are useful for multiple brands or geographies.

What happens if I delete a custom domain that is in use?

Users with UPNs or email addresses on that domain will lose access to sign-in and email. You must reassign users to another domain first.

Is it mandatory to use a custom domain for Microsoft 365?

No, but it is strongly recommended for professionalism and to enable features like branded email. The default onmicrosoft.com can be used, but it is not suitable for business communication.

Can I change the default domain from onmicrosoft.com to a custom domain?

Yes. After verifying the custom domain, you can set it as the default domain in the admin center. New users will then be created with that custom domain by default.

Summary

Custom domains are a fundamental element of identity and governance in Microsoft 365 and Azure AD. They replace the generic onmicrosoft.com domain with your own branded domain, providing a professional appearance and enabling critical services like secure email and federated authentication.

The process of adding, verifying, and managing custom domains is straightforward but requires attention to detail, especially regarding DNS records and propagation times. Common mistakes such as attempting to delete a domain still in use, failing to wait for DNS propagation, or ignoring the verification step can lead to service disruptions. In exams like MS-102 and AZ-104, custom domain topics appear regularly in scenario-based questions, step-ordering tasks, and troubleshooting scenarios.

Mastery of this concept means understanding the verification flow, the role of DNS records, and the practical steps for assigning domains to users. For IT professionals, custom domain management is a daily task that underpins the entire identity infrastructure of an organization. By focusing on the verification process and the dependencies between domains, users, and services, you will be well-prepared for both the exam and real-world administration.