diff --git a/provider/pdns/pdns.go b/provider/pdns/pdns.go index f3e2578858..1452f9b820 100644 --- a/provider/pdns/pdns.go +++ b/provider/pdns/pdns.go @@ -166,7 +166,8 @@ func (c *PDNSAPIClient) ListZones() (zones []pgo.Zone, resp *http.Response, err func (c *PDNSAPIClient) PartitionZones(zones []pgo.Zone) (filteredZones []pgo.Zone, residualZones []pgo.Zone) { if c.domainFilter.IsConfigured() { for _, zone := range zones { - if c.domainFilter.Match(zone.Name) || c.domainFilter.MatchParent(zone.Name) { + isMatch := c.domainFilter.Match(zone.Name) + if isMatch || (!c.domainFilter.IsRegexFilterConfigured() && c.domainFilter.MatchParent(zone.Name)) { filteredZones = append(filteredZones, zone) } else { residualZones = append(residualZones, zone)