About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
After a power cut, a host failure or a round of patching, a domain controller sits at Preparing network connections for a long time before the sign-in screen appears. Microsoft describes the DNS Server role stopping responding for 15 to 25 minutes, with this warning in the DNS Server log (Microsoft Learn, event 4013):
Event ID: 4013, Source: DNS. The DNS server was unable to open the Active Directory. This DNS server is configured to use directory service information and can not operate without access to the directory. The DNS server will wait for the directory to start.
The cause is almost always a circle: DNS is waiting for Active Directory, and Active Directory is waiting for DNS.
What you see
- A long pause at Preparing network connections after a restart, typically around 20 minutes in Microsoft's examples.
- DNS event 4013 in the DNS Server log. The data field may be empty or show a status such as 9717 (DNS_ERROR_DS_UNAVAILABLE, "The directory service is unavailable"), 9005 (DNS operation refused) or 9002 (DNS server failure).
- During the delay, the DNS console (DNSMGMT.MSC) reports "The server could not be contacted… The server is unavailable", and Active Directory Users and Computers reports "Naming information could not be located".
- It is worst when several domain controllers come up at the same time, for example both servers in a small office after a power outage.
Why it happens
At start-up, a domain controller that knows about other domain controllers tries to pull in changes for every directory partition it holds (schema, configuration, domain and the two DNS application partitions). Microsoft calls this the initial synchronisation (Microsoft Learn, event 4013).
Two things then wait on each other:
- DNS waits for Active Directory. A DNS server hosting Active Directory-integrated zones delays its own start so it can serve the latest zone data, until the initial synchronisation finishes.
- Active Directory waits for DNS. To replicate, the domain controller must resolve each partner's
_msdcsalias (the GUID-based CNAME record) to an IP address, using whatever DNS servers are set in its network adapter.
If those DNS servers are not answering, every lookup has to time out. Microsoft's testing found that when DNS is unavailable, the directory service sends ten DNS queries per partition per partner (GUID name, then full name, then short name), each waiting about 12 seconds with default timeouts. With five partitions that adds up to many minutes before the domain controller gives up and finishes starting.
Microsoft lists the set-ups that make this happen:
- A domain controller whose only DNS server is itself (including 127.0.0.1) in a forest with more than one domain controller.
- Two domain controllers that each point at the other first and themselves second, restarted at the same time. Each is waiting for the other's DNS.
- A domain controller pointing at DNS servers that are offline, unreachable, do not exist any more or do not hold the
_msdcszone. - A domain controller started on an isolated network, or one that still has references to retired or switched-off domain controllers.
- Real replication faults with partners that are online and reachable.
How to prove the cause
These checks change nothing.
1. Read the DNS client settings on each domain controller.
ipconfig /all
Note the order of the DNS servers on the network adapter. Compare it with the patterns above: itself only, a partner that was also restarting, or an address that no longer answers (Microsoft Learn, DNS client settings).
2. Check that each DNS server listed can answer for the partner's alias. For every DNS server the domain controller uses, and for each replication partner:
nslookup -type=CNAME <partner DSA object GUID>._msdcs.<forest root DNS name> <DNS server IP>
nslookup -type=A+AAAA <FQDN of partner DC> <DNS server IP>
The partner's DSA object GUID is in the header of repadmin /showreps run on that partner. These lookups follow Microsoft's replication guidance (Microsoft Learn, error -2146893022). A missing, duplicate or stale record is part of this fault.
3. Look for fallback events. NTDS Replication events 2087 and 2088 in the Directory Service log mean the domain controller could not resolve a partner's alias and fell back to slower name lookups (Microsoft Learn, event 4013).
4. Look for retired or offline partners. In repadmin /showrepl, a partner that no longer exists, or has been switched off for a long time, is one the domain controller will wait for at every start.
5. Note what else was restarting. If both domain controllers, or both DNS servers, went down together (same host, same power feed, same patch window), the circular wait is the likely cause.
The fix
The wait ends when a domain controller can reach at least one working DNS server that is not restarting at the same time. In a two-controller office, the DNS client order alone does not prevent it if both restart together. Staggered restarts come first, and the client order below makes them work.
Set the DNS client order on every domain controller
Microsoft's guidance (Microsoft Learn, event 4013; Microsoft Learn, DNS client settings):
- One domain controller in the forest: point it at its own address. That is acceptable only while it is the only one.
- More than one domain controller: do not point a domain controller at a single DNS server, and especially not only at itself. List another domain controller running DNS as well, with itself as a later entry.
- Hub site domain controllers: preferred and alternate DNS servers in the same site, then itself.
- Branch site domain controllers: preferred DNS on a hub-site DNS server, alternate on one in the same or nearest site, then itself (its own static address or 127.0.0.1).
- Never list your internet provider's DNS servers on a domain controller. Forward to them from your own DNS servers instead.
Change these on the network adapter's IPv4 (and IPv6, if used) properties, one domain controller at a time.
Remove what the domain controller is waiting for
- Clean up the metadata of domain controllers that no longer exist, so they are not tried at every start.
- Bring offline domain controllers back into service, or remove them properly.
- Correct missing, duplicate or stale
_msdcsalias and host records. Microsoft notes that scavenging is off by default, which lets stale host records build up, but that scavenging set too aggressively removes valid ones. - Fix any genuine replication failure found in
repadmin /showreplfirst.
Restart one domain controller at a time
Stagger restarts so that a domain controller never comes up while the DNS servers it points at are also down. Microsoft suggests staggering installs that need a restart so that only half of the DNS servers that domain controllers rely on restart at the same time. Avoid placing every DNS server on the same physical host or in the same site.
Starting into a known-bad situation
If you have to start a domain controller before its partners are available (for example after a full-site outage), Microsoft documents this sequence:
- Set the DNS Server service startup type to Manual.
- Restart and wait for the domain controller to advertise.
- Start the DNS Server service.
With the DNS Server service on Manual, Active Directory does not wait for it. Once the partners are back, set the DNS Server service startup type back to Automatic. Left on Manual, DNS does not start after the next restart.
How to confirm the fix
- After a planned restart, the domain controller reaches the sign-in screen without the long pause, and no new event 4013 is logged.
nslookupfrom step 2 returns the correct address for every partner from every DNS server listed.- No new NTDS Replication events 2087 or 2088 appear.
repadmin /showreplshows every partner succeeding, with no retired partners left in the list.
What to watch afterwards
- Network changes. Re-check DNS client settings on domain controllers whenever addresses, sites or DNS servers change. A replaced DNS server left in a domain controller's list brings the delay back.
- Restart planning. Keep patching windows and host maintenance staggered so the DNS servers a domain controller depends on are not all down together.
- Retired domain controllers. Clean up metadata every time one is removed without a normal demotion.
- Power events. Microsoft's examples include data centres where servers ride through the outage on battery and generator but then shut down on heat. A full restart of every domain controller at once is when this fault shows.
Read next
Related articles you may want next.
- TroubleshootingAD replication error 1722 "The RPC server is unavailable": find the layer that is really failingActive Directory replication fails with 1722 (0x6ba). Prove whether name resolution, a blocked port, signing or the network is at fault, fix that layer and confirm replication has caught up.Read article
- TroubleshootingClean Up Stale AD DNS Records: Scavenging Without Deleting Live OnesStale DNS records in an AD-integrated zone? Understand no-refresh and refresh intervals and timestamps, list records by age first, then enable scavenging on one server safely.Read article
- Backup & RecoveryDomain Controllers on VMware: Snapshots and RestoresWhat VM-GenerationID protects when a virtual domain controller is reverted or restored, how USN rollback shows up, and when to call a directory specialist.Read article
Risks and limits
- Microsoft notes that some content recommends setting the registry value
Repl Perform Initial Synchronizationsto 0 underHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parametersto skip the initial synchronisation. Microsoft says this is not recommended in production or on an ongoing basis: use it only for a temporary, specific problem and restore the default afterwards. A domain controller that skips initial synchronisation can start with out-of-date data. - Microsoft's DNS client guidance points out that the DNS client only switches to the alternate server when the preferred one does not respond. A wrong but authoritative answer is not retried elsewhere, so a stale record on the preferred server still causes trouble.
- Hosts files, LMHOSTS and WINS can mask name resolution problems, but Microsoft warns static entries go stale over time and can send a domain controller to the wrong partner.
- The event 4013 page includes test figures from 2010 and refers to Windows Server 2003 behaviour. The mechanism still applies; the exact timings on your servers will differ.
Sources
- Microsoft Learn, "Troubleshoot DNS Event ID 4013 (The DNS server was unable to load AD-integrated DNS zones)" (KB 2001093), last updated 12 February 2026: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/troubleshoot-dns-event-id-4013
- Microsoft Learn, "Recommendations for Domain Name System (DNS) client settings", last updated 12 February 2026: https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/best-practices-for-dns-client-settings
- Microsoft Learn, "Active Directory replication error -2146893022 (0x80090322): The target principal name is incorrect" (
nslookupchecks for the_msdcsalias and host records), last updated 12 February 2026: https://learn.microsoft.com/en-us/troubleshoot/windows-server/active-directory/replication-error-2146893022
Next step
A domain controller that takes 20 minutes to start after a power cut usually has a DNS order that was fine with one server and was never revisited when the second arrived. If you want your domain controllers' DNS settings, restart planning and replication checked together, NetLeverage has looked after business servers since 2002. Talk to us through managed support with the ipconfig /all output from each domain controller.
This article was originally published on .