0X000004C5

0X000004C5: Workgroup or domain name already in use

This error pops up when two computers on the same network have the same name. It stops you from joining a domain or workgroup. The fix is simple: rename the computer.

You're trying to join a domain or workgroup from a Windows 10 or Windows 11 machine, and right after typing the domain name and credentials, you get this error:

"Your computer could not be joined to the domain. The specified workgroup or domain name is already in use by another computer on the network."

Error code: 0X000004C5.

This almost always happens because another computer on your local network already has the same name as yours. Maybe IT set up a temporary machine with the same hostname, or you cloned a VM without renaming it. Maybe someone changed their PC name to match yours by accident. Whatever the trigger, the fix is short and sweet.

What's actually going on?

Windows networks rely on unique names for each computer. No two machines can share the same name on the same subnet. When you try to join a domain, the domain controller checks if that name is already registered. If it finds a duplicate, it blocks the join with this error.

The real fix is to give your computer a new, unique name. Don't bother checking DNS or flushing caches first — that's wasted time. The problem is the duplicate name, and renaming the PC solves it.

Step-by-step fix

Before you start, write down your current computer name. You can find it in Settings > System > About under "Device name". You'll need it later if something goes wrong.

Step 1: Open system properties

  1. Press Windows key + R to open the Run dialog.
  2. Type sysdm.cpl and press Enter.
  3. You should see the System Properties window with the Computer Name tab selected.

Step 2: Rename the computer

  1. Click the Change button near the bottom of the window.
  2. In the Computer name field, type a new name. Keep it short — under 15 characters — and use only letters, numbers, and hyphens. No spaces or special characters. For example, DESKTOP-ABC123 or WORK-PC02.
  3. Under Member of, make sure Domain is selected and that the domain name is filled in correctly. If you're joining a workgroup, the workgroup name should match your existing workgroup. But the trick is to change the computer name, not the workgroup name.
  4. Click OK.

After you click OK, Windows will ask you for domain credentials again. Enter the same username and password you tried before. This time, it should work.

Step 3: Reboot and verify

  1. If the domain join succeeds, Windows will prompt you to restart. Click OK and then Close.
  2. Restart your computer.
  3. After reboot, log in with domain credentials. You should see your new computer name in the domain controller's list of computers.

What if it still fails?

Two things can go wrong even after renaming. Check these in order:

  1. DNS cache on the domain controller — If the old computer name is stuck in DNS, the domain controller might still see a conflict. Ask your network admin to run ipconfig /flushdns on the domain controller, or check DNS Manager for stale records.
  2. Network interface with a static IP — Sometimes a static IP used by the old machine with the same name is still active. If you can, switch your PC to DHCP for a moment and then back to static. That clears the ARP cache on the network.
  3. Firewall or group policy — Rare, but possible. If you renamed and rebooted but still get the error, have your admin check if a group policy is forcing your computer name to something already in use.

In most cases, just renaming the computer once does the job. I've seen this fix work for hundreds of machines over the years. Give it a try.

Related Errors in Network & Connectivity
Static IP configuration not saving Static IP Keeps Reverting to DHCP on Windows 10/11 0X000006FD Fix 0X000006FD: Trust Relationship Failure in Under 5 Minutes 0X00002557 Fix DNS_STATUS_SINGLE_PART_NAME (0X00002557) Fast QoS_E_POLICY_APPLY_FAILED (0x806B0022) QoS policy won't apply after Windows 10 22H2 update

Was this solution helpful?

EP
Erropedia Team
Tech Support Editors
The Erropedia editorial team researches and documents real-world tech errors from across Windows, Linux, macOS, networking, databases, cloud platforms, and more. Every solution is reviewed for accuracy and updated as software and systems evolve.