Fix it now
The DNS server could not read a zone out of the directory partition that holds it. Microsoft does not publish event 4521, so work from the event it does publish for this failure, 4007, which names both the zone and the partition: check that this server is enlisted in that partition, and that its secure channel is intact.
Get-DnsServerDirectoryPartition
repadmin /showrepl
- Read the partition list. Microsoft’s documented output shows each partition with a State such as 0(DNS_DP_OKAY) and Flags reading Enlisted Auto Domain or Enlisted Auto Forest, so enlistment is visible directly rather than inferred.
- If the partition holding the zone is missing, enlist the server:
Register-DnsServerDirectoryPartition -Name DomainDnsZones.<yourdomain>, and the same for ForestDnsZones if the zone is forest-wide. - Check that the partition itself is replicating. In
repadmin /showrepl, look specifically for the DomainDnsZones and ForestDnsZones naming contexts, not only the domain one. - If Event 4007 or 4000 is present too, treat the secure channel as the first suspect: Microsoft’s documented cause for that pair is the domain controller having lost its secure channel with itself or with the PDC emulator.
A DNS server that is not a domain controller cannot hold a directory partition at all, so it can never host a directory-integrated zone. A secondary zone is the answer there.
If the zone loads and answers authoritatively, you are done. If not, the next section covers where these zones actually live.
Why it happens
Storing a zone in the directory means storing it as objects inside a directory partition. Microsoft documents two that are created during directory installation: a forest-wide application directory partition called ForestDnsZones, and a domain-wide application directory partition for each domain in the forest, called DomainDnsZones. Which partition a zone lives in depends on the replication scope chosen when the zone was created, and a custom application partition is also possible.
A DNS server can only load a zone from a partition it holds a replica of, and application partitions are not automatic: the server has to be enlisted. That is the single most common reason a zone loads on three servers and not on the fourth, and it is visible directly in the partition listing rather than needing to be worked out.
Microsoft publishes Event 4007 for exactly this failure: the DNS server was unable to open the named zone in Active Directory from the named application directory partition, is configured to obtain and use information from the directory for that zone, and cannot load it without that. Read the zone name and the partition name out of the entry; those two facts tell you which partition to check enlistment against.
The documented cause for that event is the one most people never reach. Microsoft states it happens when that domain controller and DNS server has lost its secure channel with itself or with the primary domain controller emulator, and specifically that it occurs in single-domain-controller environments where the server holds all the operations master roles and points at itself for DNS. Enlistment will look perfect and the zone will still not load.
This server is not enlisted in the partition holding the zone
You have this one if Get-DnsServerDirectoryPartition does not list the partition the zone belongs to, or lists it without an Enlisted flag.
- Enlist the server:
Register-DnsServerDirectoryPartition -Name DomainDnsZones.<yourdomain>, and the same for ForestDnsZones if the zone is forest-wide. - Microsoft’s description is that after registration the DNS server adds itself to the replication scope of the partition, so the content has to arrive before the zone can load.
- Wait for the partition to replicate in. On a large partition over a slow link this is not instant.
- Restart the DNS service, then confirm the zone appears.
The secure channel between the server and the domain is broken
You have this one if Events 4007 and 4000 alongside the zone failure, often on a lone domain controller that holds every operations master role and points at itself.
- Stop the KDC service on that domain controller.
- Run
netdom resetpwd /server:<PDC.domain.com> /userd:<Domain\admin> /passwordd:*with elevated rights, and supply the password when prompted. - Reboot the server. Microsoft notes that on the only domain controller in the environment you use the server’s own address in place of the PDC name, because it is the PDC.
- Confirm the zones load after the restart before changing anything else.
This cause is invisible to every enlistment and replication check in the article. If those all pass and the zone still will not load, this is where to go next.
Replication of that partition is broken
You have this one if repadmin /showrepl shows failures specifically for the DomainDnsZones or ForestDnsZones naming context while the domain partition replicates normally.
- Read the error against that naming context rather than the summary.
- Treat it as any other replication failure: name resolution, time skew, and the RPC and LDAP ports between the partners.
- Once the underlying fault is cleared, let the partition converge before judging whether it worked.
- Restart the DNS service and confirm the zone loads.
The zone object’s ownership or permissions were changed
You have this one if The partition replicates cleanly, every other zone in it loads, and only this one fails, on every server.
- Microsoft’s documented check for the related 4015 error is ownership: open ADSI Edit, navigate to the zone object, open its security and advanced view, and verify the Owner is set to SYSTEM.
- Check the domain Users group membership as well. Microsoft’s documented check is that
net localgroup users /domainreturns Domain Users, NT AUTHORITY\Authenticated Users and NT AUTHORITY\INTERACTIVE, and to add any that are missing. - Wait for replication, then restart the DNS Server service on all domain controllers.
ADSI Edit writes directly to the directory with no confirmation. Take a system state backup of a domain controller first and change one object at a time.
Full reference
The events, and which ones are real
| Event | Status | How to read it |
|---|---|---|
| 4521 | Not published | The zone could not be read from the partition holding it. Use 4007 in the same log to get the zone and partition names |
| 4007 | Published | The DNS server was unable to open the named zone in Active Directory from the named application directory partition |
| 4004 | Not published | Read the entry for the zone it names |
| 4010 | Not published | Read the entry for what was being written |
| 4011 | Not published | Read the entry for what was being written |
Only 4007 is published by Microsoft, and it is also the most useful, because it names both the zone and the partition. If both 4521 and 4007 are present, work from 4007.
Where a zone actually lives
| Replication scope | Partition | Who holds a copy |
|---|---|---|
| Forest-wide | ForestDnsZones | Every DNS server in the forest that is enlisted in it |
| Domain-wide | DomainDnsZones for that domain | Every DNS server in that domain that is enlisted |
| All domain controllers in the domain | The domain naming context | Every domain controller in that domain |
| Custom | A custom application partition | Only servers enlisted in it |
Reading the partition listing
Get-DnsServerDirectoryPartition answers the enlistment question directly. Microsoft’s documented output shows the partition name, a State such as 0(DNS_DP_OKAY), Flags such as Enlisted Auto Domain or Enlisted Auto Forest, and a zone count. A partition that is absent from the listing is one this server is not enlisted in; a partition present with a healthy state and a zone count of zero is one that has been enlisted but has not yet replicated any content.
| Command | What it does |
|---|---|
Get-DnsServerDirectoryPartition |
Lists the partitions, with state, enlistment flags and zone count |
Get-DnsServerDirectoryPartition -Custom |
Lists the custom application directory partitions only |
Get-DnsServerDirectoryPartition -Name <fqdn> |
Reads one partition by name |
Register-DnsServerDirectoryPartition -Name <fqdn> |
Registers this DNS server in a partition, adding it to the partition’s replication scope |
Member servers and directory-integrated zones
Only a domain controller holds directory partitions, so only a domain controller can host a directory-integrated zone. A member server running the DNS role can host a standard primary, a secondary or a stub zone, and a secondary copy of the directory-integrated zone is the usual arrangement. If the machine logging this event is not a domain controller, that is your answer, and no amount of enlistment work will change it.
Choosing a replication scope
- Domain-wide for a zone only that domain queries. Wider scope means more replication traffic for no benefit.
- Forest-wide for anything every domain has to resolve.
- The _msdcs zone for the forest root belongs forest-wide, because the whole forest depends on the records in it.
- Changing a zone’s replication scope moves the objects between partitions. Do it once, during a quiet period, and let it settle before judging the result.
When enlistment and replication both check out
Go back to the secure channel. It is counter-intuitive, because nothing about a zone failing to load suggests a machine account problem, and it is what Microsoft documents as the cause of the 4000 and 4007 pair. The tell is that the failure survives every enlistment and replication check, and that it is often a single domain controller holding every operations master role and resolving through itself. Stop the KDC service, reset the machine password against the PDC emulator, reboot, and check the zones before doing anything else.
Every code this article covers
| Code | What it points at | Source |
|---|---|---|
Event ID 4521 |
Logged when a zone could not be read from the directory partition that stores it. Microsoft does not publish this event, so work from Event 4007 in the same log, which names the zone and the partition | not published by the vendor |
Event ID 4007 |
The DNS server was unable to open the named zone in Active Directory from the named application directory partition, and cannot load the zone without it | Microsoft Learn |
Event ID 4004 |
Logged around a directory enumeration for a zone. Not published by the vendor; read the entry for the zone it names | not published by the vendor |
Event ID 4010 |
Logged around a directory write for a name or zone. Not published by the vendor; read the entry for what was being updated | not published by the vendor |
Event ID 4011 |
Logged around a directory write for a record or zone object. Not published by the vendor; read the entry for what was being updated | not published by the vendor |
Confirm the fix worked
- The zone is present and loaded on the affected server.
- A record from that zone is answered authoritatively when queried against this server directly.
Get-DnsServerDirectoryPartitionlists the partition with an Enlisted flag and a non-zero zone count.repadmin /showreplshows no failures for the DomainDnsZones or ForestDnsZones naming context.- Restart the DNS service once more and confirm no new event appears for that zone.
Questions people ask about this
Is there a licence or product that fixes this?
No. Partition enlistment and replication scope are configuration inside Active Directory, and nothing you can buy changes whether a server holds a copy of a directory partition.
Microsoft does not document 4521. What should I read instead?
Event 4007, which Microsoft does publish and which names both the zone and the application directory partition it could not be opened from. If you have 4521 and 4007 together, work from 4007.
Can a member server host a directory-integrated zone?
No. Only a domain controller holds directory partitions. A member server running DNS can host a standard primary, a secondary or a stub zone, and a secondary of the directory-integrated zone is the usual arrangement.
Everything is enlisted and replicating and the zone still will not load. Now what?
Check the secure channel. Microsoft’s documented cause for the 4000 and 4007 pair is a domain controller that has lost its secure channel with itself or with the PDC emulator, repaired by stopping the KDC service, running netdom resetpwd against the PDC, and rebooting.
Should zones be forest-wide or domain-wide?
Domain-wide for a zone only that domain uses, forest-wide for anything every domain must resolve, and the _msdcs zone for the forest root belongs forest-wide. Wider scope costs replication traffic for no benefit if nobody outside the domain queries it.
