TechnitiumSoftware/DnsServer · error · DnsServerException
No such zone was found: <zoneName or ".">
Error message
No such zone was found: <zoneName or ".">
What it means
Thrown by the public ConvertZoneTypeTo(string, AuthZoneType) when GetAuthZoneInfo(zoneName) returns null. Identical lookup semantics to error 381: the zone name is unknown, deleted, or malformed, and an empty name is displayed as '.'.
Source
Thrown at DnsServerCore/Dns/ZoneManagers/AuthZoneManager.cs:1438
newRecords.Add(newRecord);
break;
}
}
//load and init zone
LoadAndInitZone(zoneInfo, newRecords);
//save zone file
SaveZoneFile(zoneInfo.Name);
return zoneInfo;
}
public AuthZoneInfo ConvertZoneTypeTo(string zoneName, AuthZoneType newType)
{
AuthZoneInfo currentZoneInfo = GetAuthZoneInfo(zoneName);
if (currentZoneInfo is null)
throw new DnsServerException("No such zone was found: " + (zoneName.Length == 0 ? "." : zoneName));
//validate conversion type
if (currentZoneInfo.Type == newType)
throw new DnsServerException("Cannot convert the zone '" + currentZoneInfo.DisplayName + "' from " + currentZoneInfo.TypeName + " to " + AuthZoneInfo.GetZoneTypeName(newType) + " zone: the zone is already of the same type.");
switch (currentZoneInfo.Type)
{
case AuthZoneType.Primary:
switch (newType)
{
case AuthZoneType.Forwarder:
if (currentZoneInfo.ApexZone.DnssecStatus != AuthZoneDnssecStatus.Unsigned)
throw new DnsServerException("Cannot convert the zone '" + currentZoneInfo.DisplayName + "' from " + currentZoneInfo.TypeName + " to " + AuthZoneInfo.GetZoneTypeName(newType) + " zone: converting the zone will cause lose of DNSSEC private keys.");
break;
default:
throw new DnsServerException("Cannot convert the zone '" + currentZoneInfo.DisplayName + "' from " + currentZoneInfo.TypeName + " to " + AuthZoneInfo.GetZoneTypeName(newType) + " zone: not supported.");View on GitHub (pinned to d0484b6c1e)
Solutions
- Confirm the zone exists via GetAuthZoneInfo(zoneName) before converting.
- Normalize the name (trim, strip trailing dot) and re-resolve.
- Refresh the zone list to ensure the target is still present.
- Catch DnsServerException and surface a 'zone not found' error to the API caller.
Example fix
// before
manager.ConvertZoneTypeTo(zoneName, AuthZoneType.Primary); // throws if missing
// after
if (manager.GetAuthZoneInfo(zoneName) is null)
return NotFound($"Zone '{zoneName}' not found; cannot convert.");
manager.ConvertZoneTypeTo(zoneName, AuthZoneType.Primary); Defensive patterns
Strategy: validation
Validate before calling
if (manager.GetAuthZoneInfo(zoneName) is null)
return NotFound($"Zone '{zoneName}' not found; cannot convert."); Try / catch
try { manager.ConvertZoneTypeTo(zoneName, newType); }
catch (DnsServerException ex) when (ex.Message.StartsWith("No such zone was found")) { return NotFound(ex.Message); } Prevention
- Resolve and confirm the zone before converting.
- Normalize the zone name before lookup.
- Refresh zone state before type conversions.
When it happens
Trigger: Calling ConvertZoneTypeTo(zoneName, newType) with a zoneName that does not resolve to an authoritative ApexZone. The null-check at line 1437 fires immediately after the GetAuthZoneInfo call.
Common situations: Converting a zone that was just deleted. Misspelled name or wrong casing. Passing the zone's display name instead of its canonical name. Race between a delete and a convert.
Related errors
- No such zone was found: <sourceZoneName or ".">
- Cannot convert the zone '<currentZoneInfo.DisplayName>' from
- Cannot convert the zone '<currentZoneInfo.DisplayName>' from
- Cannot convert the zone '<currentZoneInfo.DisplayName>' from
- No such Catalog zone was found: <catalogZoneName>
AI-assisted analysis of TechnitiumSoftware/DnsServer@d0484b6c1e (2026-08-13).
Data as JSON: /api/errors/006397b7f3838c6f.
Report an issue: GitHub.