What joining a domain means and why you'd do it
Joining a computer to a domain means connecting it to a centralized network where a server — usually running Windows Server or similar software — manages user accounts, passwords, and permissions across multiple machines. Instead of managing each computer separately, a domain administrator can push out software updates, enforce security policies, and let employees log in with a single username and password across any machine on the network.
Most organizations with more than a handful of computers use domains. If you work in an office where IT set up your computer and you log in with your company email, you're already on a domain. If you're setting up a small office network or adding a new computer to an existing one, you'll need to join it yourself.
The process differs slightly depending on whether you're using Windows, macOS, or Linux, and whether your domain controller is on-site or cloud-based (like Microsoft Entra ID, formerly Azure AD). This guide covers the most common scenario: joining a Windows computer to an on-premises Active Directory domain.
Key Takeaways
- You need the domain name, a domain administrator account, and network access to the domain controller before you start.
- On Windows, joining a domain happens in Settings under System, and requires a restart.
- After joining, users log in with their domain credentials instead of local computer credentials.
- If the domain controller is unreachable or credentials are wrong, the join will fail and you'll see a specific error message that tells you what went wrong.
- Cloud-based domains like Entra ID use a different process and may require additional software or authentication steps.
What you need before you start
Gather these four things before attempting to join a domain. First, you need the domain name — this is usually something like "company.local" or "corp.example.com". Ask your IT department or network administrator if you don't know it.
Second, you need credentials for a domain administrator account or an account with permission to join computers to the domain. This is not your regular user account; it's a special account that has the authority to add machines to the domain. Your IT department will provide this.
Third, the computer must have network connectivity to the domain controller — the server that manages the domain. This can be a wired Ethernet connection or a wireless connection, but it must reach the domain controller's network. If you're on a different network or behind a firewall that blocks domain traffic, the join will fail.
Fourth, you need local administrator access on the computer you're joining. You can't join a domain from a standard user account; you must be logged in as a local administrator or have administrator credentials ready when prompted.
Joining a Windows computer to an on-premises domain
Open Settings and go to System, then scroll down to find About. Near the bottom, you'll see a section called "Related settings" with a link that says Rename this PC (advanced). Click it.
A window titled "System Properties" will open with several tabs. Click the Computer Name tab. You'll see the current computer name and a button labeled Change. Click that button.
A smaller dialog box titled "Computer Name/Domain Changes" will appear. This is where you enter the domain name. Under "Member of," select the radio button next to Domain (it may currently be set to "Workgroup"). In the text field next to it, type the domain name exactly as your IT department provided it — for example, "company.local".
Click OK. Windows will prompt you for credentials. Enter the domain administrator username and password. The username format is usually "DOMAIN\username" or sometimes just "username" if Windows infers the domain. If you're unsure, ask your IT department for the exact format.
Windows will contact the domain controller to verify the credentials and check whether the computer can be added. This takes a few seconds to a minute depending on network speed. If successful, you'll see a welcome message. If it fails, you'll see an error code — see the troubleshooting section below for what common errors mean.
After a successful join, Windows will ask you to restart the computer. Do so immediately. During the restart, Windows applies domain policies and sets up the domain user profile structure. After restart, the login screen will change — instead of showing local user accounts, it will show a field for "Other user" where domain users can log in with their domain credentials.
Joining a macOS computer to a domain
macOS can join Active Directory domains, though the process is less common than on Windows. Open System Settings, then go to General and select Sharing. Look for a button or option related to directory services or domain joining — the exact location varies by macOS version.
Alternatively, open Directory Utility (search for it in Spotlight). Click the lock icon to unlock it, then click the + button to add a new directory. Select Active Directory and enter the domain name, domain administrator credentials, and any other required information.
macOS will attempt to contact the domain controller and verify the credentials. If successful, the Mac is now bound to the domain. Users can log in with their domain credentials at the login screen. The exact steps and available options depend on your macOS version and whether your organization uses additional tools like Jamf or Intune to manage macOS devices.
Joining a Linux computer to a domain
Linux domain joining typically requires command-line tools and is more involved than Windows or macOS. The most common approach uses realmd, a tool that simplifies joining Active Directory domains on Linux systems.
First, install realmd and related packages. On Ubuntu or Debian, run sudo apt install realmd sssd sssd-tools libnss-sss libpam-sss adcli krb5-user. On Red Hat or CentOS, use sudo yum install realmd sssd sssd-tools adcli krb5-workstation.
Once installed, discover the domain with sudo realm discover company.local (replace with your actual domain name). This checks whether the domain controller is reachable and returns information about the domain.
Join the domain with sudo realm join -U 'DOMAIN\administrator' company.local, replacing the username and domain name as needed. You'll be prompted for the administrator password. If successful, the computer is now joined and users can log in with domain credentials.
What happens after you join a domain
Once a computer is joined, several things change. The computer now trusts the domain controller and will authenticate users against the domain's user database instead of the local user database. When someone logs in, Windows (or macOS or Linux) contacts the domain controller to verify their username and password.
The domain administrator can now push policies to the computer — security settings, software installations, printer configurations, and more. These policies apply automatically and override local settings. If the domain controller becomes unreachable for an extended period, users with cached credentials can still log in, but new users cannot.
The computer also becomes subject to domain security policies. For example, the domain administrator might require passwords to be at least 14 characters, enforce automatic screen locks after 15 minutes of inactivity, or prevent users from installing software. These policies are enforced by the domain, not by the individual computer.
Troubleshooting common domain join errors
If the join fails, Windows displays an error code. Here are the most common ones and what they mean.
"The specified domain either does not exist or could not be contacted." This means the computer cannot reach the domain controller. Check that the computer is connected to the network, that DNS is working (try pinging the domain name from Command Prompt), and that there's no firewall blocking port 445 or 389. If you're on a different network, you may need a VPN connection to reach the domain controller.
"Access is denied." The credentials you entered are wrong, or the account doesn't have permission to join computers to the domain. Verify the username and password with your IT department. Make sure you're using the correct format — often "DOMAIN\username" rather than just "username".
"The computer name already exists on the domain." Another computer with the same name is already joined to the domain. Rename the computer (in System Properties, Computer Name tab) to something unique and try again.
"The specified computer name is invalid." Computer names have restrictions — they can't contain spaces, special characters, or be longer than 15 characters. Rename the computer to something simple like "OFFICE-DESK-01" and try again.
Joining a computer to a cloud-based domain
If your organization uses Microsoft Entra ID (formerly Azure AD) or another cloud-based directory service instead of an on-premises domain, the process is different. These services don't use the traditional domain join method.
For Entra ID on Windows, you typically go to Settings > Accounts > Access work or school and click Connect. You'll sign in with your organizational email and password, and the computer registers with Entra ID. This is called "Entra ID join" or "Azure AD join," and it's becoming more common as organizations move to cloud-based management.
Some organizations use a hybrid approach where the computer is joined to both an on-premises domain and Entra ID. Your IT department will tell you which method applies to your organization and provide any additional software or configuration steps needed.
Frequently Asked Questions
Can I join a domain without restarting?
Windows requires a restart to complete the domain join process and apply domain policies. Some policies won't take effect until after the restart. Plan the join for a time when the computer can be restarted without disrupting work.
What if I forget the domain name?
Ask your IT department or network administrator. If you have access to another computer already on the domain, you can open Command Prompt and type echo %userdomain% to see the domain name. You can also check the System Properties window on a domain-joined computer.
Can I join a domain if I'm not in the office?
Only if you have a VPN connection to your organization's network. The computer must be able to reach the domain controller, which usually means being on the same network or connected via VPN. Ask your IT department whether remote domain joins are supported and how to set up VPN access.
What's the difference between joining a domain and logging in with a Microsoft account?
Logging in with a Microsoft account (your personal outlook.com or similar) is not the same as joining a domain. A Microsoft account is cloud-based and personal. Joining a domain connects the computer to your organization's network and uses your organizational credentials. You can do both — log in with a domain account and also link a Microsoft account — but they serve different purposes.
Can I unjoin a computer from a domain?
Yes. Go to System Properties, Computer Name tab, click Change, select "Workgroup," enter a workgroup name, and restart. The computer will no longer be part of the domain. However, you'll lose access to domain resources and policies, and you'll need a local administrator account to log in afterward. Check with your IT department before unjoining a computer.