DNS Server Event 4013: The DNS Server Is Waiting for AD DS Initial Synchronization

Fix DNS Server event 4013 on a domain controller (DNS waiting for AD DS initial synchronization, slow boot at Preparing network connections): fix DC DNS client settings, stale DCs and GUID CNAME resolution.

Home › Guides › DNS Server event 4013

Last updated 19 November 2026

Quick answer

Event 4013 means the DNS Server service on a domain controller that hosts AD-integrated zones is waiting for Active Directory to finish its initial synchronization (inbound replication of its directory partitions) before it loads the zones. AD in turn can't replicate until it resolves its source DC's GUID CNAME in DNS, so DCs that only point at themselves or at each other can hang for 15 to 25 minutes at "Preparing network connections" after a restart. Microsoft's fixes:

  1. Don't point a DC that hosts AD-integrated zones only at one DNS server, and especially not only at itself (Step 2).
  2. Remove references to stale DCs and make offline DCs operational (Step 3).
  3. Make sure DCs can resolve the GUID CNAME and host records of their source DCs (Step 4).
  4. When you must boot into a known bad configuration, set the DNS Server service to Manual, reboot, wait for the DC to advertise, then start DNS (Step 5).

What the event looks like

Windows Server 2008 and later (source Microsoft-Windows-DNS-Server-Service, symbolic name DNS_EVENT_DS_OPEN_WAIT):

The DNS server is waiting for Active Directory Domain Services (AD DS) to signal that the initial synchronization of the directory has been completed. The DNS server service cannot start until the initial synchronization is complete because critical DNS data might not yet be replicated onto this domain controller. If events in the AD DS event log indicate that there is a problem with DNS name resolution, consider adding the IP address of another DNS server for this domain to the DNS server list in the Internet Protocol properties of this computer. This event will be logged every two minutes until AD DS has signaled that the initial synchronization has successfully completed.

The older wording (Event Source DNS, type Warning):

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. If the DNS server is started but the appropriate event has not been logged, then the DNS server is still waiting for the directory to start.

The Data field may hold a status code, or none:

HexDecimalSymbolic nameError string
000025f59717DNS_ERROR_DS_UNAVAILABLEThe directory service is unavailable
0000232d9005DNS_ERROR_RCODE_REFUSEDDNS operation refused.
0000232a9002DNS_ERROR_RCODE_SERVER_FAILUREDNS server failure.

While it waits, DNS Manager (DNSMGMT.MSC) fails with "The server <computername> could not be contacted. The error was: The server is unavailable. Would you like to add it anyway?" and Active Directory Users and Computers (DSA.MSC) with "Naming information could not be located".

Why it happens

DCs whose copy of AD lists other DCs try to inbound replicate every locally held partition at startup (init sync). DNS servers hosting AD-integrated zones delay their own startup for several minutes so they boot with the latest zone data, unless AD has already finished init sync. Meanwhile AD can't replicate a partition until it resolves the source DC's CNAME GUID to an IP address on the DNS servers it uses. Most DCs hold at least five partitions (schema, configuration, domain, and the forest-wide and domain-wide DNS application partitions) and can see a 15-20 minute delay; extra partitions make it longer.

Microsoft's two typical scenarios: two DCs in one data center, each using the other as preferred DNS and itself as alternate, both shut down by a power or cooling outage and restarted together; and a single DC in a site that points only to itself (or to a DC across a WAN link that's down at boot). Conditions that make it worse:

Where the time goes, from Microsoft's AD development team testing: with a working DNS server, NTDS needs two queries (IPv4 and IPv6) per source and they return almost instantly. With no DNS server available it sends 10 (four for the GUID-based name, four for the fully qualified name and two for the single-label name). Each waits for DNSQueryTimeouts, by default 1 1 2 4 4 (12 seconds), so each naming context takes about 120 seconds per source, multiplied across the partitions.

Step 1: Confirm the event and replication health

Find the DNS log's exact name, then pull the 4013 events:

Get-WinEvent -ListLog *DNS*
Get-WinEvent -FilterHashtable @{LogName='<DNS log name>'; Id=4013}

Check that AD DS is working (the Server 2008 resolution is to troubleshoot AD DS, then restart the DNS Server service), for example with repadmin /showrepl and DCDIAG /TEST:DNS /V /E /F:<File name.txt>. Restart DNS with Restart-Service -Name DNS or net start DNS if it's stopped. Microsoft's verification: event IDs 4523 and 4524 are logged and no events in the range 4000 to 4019 appear in the DNS event log. Events 2087 and 2088 in the Directory Service log mean a destination DC couldn't resolve a source DC's CNAME GUID record and name resolution fallback is occurring; see replication error 8524.

Step 2: Fix the DNS client settings on your DCs

Pointing a DC at a single DNS server IP, including the 127.0.0.1 loopback, is a single point of failure: tolerable in a forest with one DC, not with several. Microsoft's guidance:

Pointing at hub-site DNS servers cuts the hops needed to get DC SRV and host records registered. Hub DCs in the same site replicate changes every 15 seconds (Windows Server 2003 or later), and a branch DC that can't outbound replicate may never get its own registrations off-box.

Step 3: Remove stale DCs and bring offline DCs back

Every DC listed in the local copy of AD is a partner init sync will try. Clean up the metadata of DCs that no longer exist (replication error 8524, Step 1 shows how), and make offline or non-functioning DCs operational.

Step 4: Make sure DCs can resolve their source DCs

DCs should point to DNS servers that are available at Windows startup, host, forward or delegate the _msdcs.<forest root domain> and primary DNS suffix zones of current and potential source DCs, and can resolve their current CNAME GUID records (for example dded5a29-fc25-4fd8-aa98-7f472fc6f09b._msdcs.contoso.com) and host records. Test from the DC:

Resolve-DnsName -Name dded5a29-fc25-4fd8-aa98-7f472fc6f09b._msdcs.contoso.com -Type CNAME -Server <DNS server IP>

Missing, duplicate or stale CNAME and host records all contribute. Scavenging isn't enabled on Microsoft DNS servers by default, which makes stale host records more likely, but scavenging that's too aggressive purges valid records. Since Windows Server 2003 SP1, DCs fall back from the CNAME GUID to the fully qualified host name and then to the NetBIOS name. WINS, HOSTS and LMHOSTS can all support that fallback; WINS scales best because it takes dynamic updates, while static HOSTS and LMHOSTS entries go stale and can resolve one DC to another without any name query showing up in a trace.

Step 5: Booting into a known bad configuration

Microsoft's workaround when you have to start a DC in one of these configurations:

  1. Set the DNS Server service startup value to manual:
    Set-Service -Name DNS -StartupType Manual
  2. Reboot and wait for the domain controller to advertise.
  3. Restart the DNS Server service: Restart-Service -Name DNS.

With the DNS Server service set to manual, Active Directory doesn't wait for it to start. Microsoft's steps stop there, so put the startup type back to normal once the DNS client settings are fixed.

You'll also see advice to set Repl Perform Initial Synchronizations (REG_DWORD) to 0 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Parameters to skip init sync. Microsoft doesn't recommend it in production or on an ongoing basis: use it only in critical situations for temporary, specific problems, and restore the default afterwards.

Avoid it next time

Related tools and guides

Look up 4013, 2087 and 2088 in the Windows Event ID Lookup, copy the Set-Service, Restart-Service, Get-WinEvent and Resolve-DnsName lines from the PowerShell Cheat Sheet, pull GUIDs and timestamps out of event or log text with the Regex Tester, check that the DNS server addresses in a DC's settings are in the site you expect with the IPv4 Subnet Calculator or IPv6 Subnet Calculator, and if your patching or automation tool takes cron syntax, check staggered reboot schedules with the Cron Expression Explainer. Related guides: replication error 8524, replication errors 8456 and 8457, replication error 1722 and Netlogon event 5719.

Zones still not loading after AD DS is up, or a critical error from the Active Directory? See DNS Server events 4000, 4007, 4004 and 4016 and DNS Server event 4015.

Every Windows DNS Server and DHCP Server event and symptom in one place: common Windows DNS Server and DHCP Server errors.

FAQ

What does DNS Server event 4013 mean?

The DNS Server service on a domain controller with AD-integrated zones is waiting for Active Directory Domain Services to signal that its initial synchronization is complete. The event is logged every two minutes until AD DS finishes inbound replication of its directory partitions.

Why does my domain controller hang at Preparing network connections?

DNS delays its startup until AD completes initial synchronization, and AD cannot replicate until it resolves its source DC's GUID CNAME in DNS. If the DC points only at itself or at a partner that is also rebooting, every lookup times out and startup can take 15 to 25 minutes.

How should a domain controller's DNS client settings be configured?

Microsoft says hub-site DCs should use DNS servers in the same site as preferred and alternate and then themselves; branch DCs should prefer a hub-site DNS server, then an in-site or nearest DNS server, then themselves. Don't point a DC in a multi-DC forest at a single DNS server, including only 127.0.0.1.

Should I set Repl Perform Initial Synchronizations to 0?

Microsoft does not recommend it in production or on an ongoing basis. Use it only in critical situations to resolve temporary, specific problems, and restore the default setting once the problem is fixed.

How do I start a domain controller quickly when DNS is broken?

Set the DNS Server service startup value to manual, reboot, wait for the domain controller to advertise, then restart the DNS Server service. With DNS set to manual, Active Directory does not wait for the DNS Server service to start.

Want the full kit?

Runbooks, checklists and helpdesk templates: IT Admin Packs on Gumroad.