Run a scheduled, read-only reconciliation between tenant records and the live zone inventory, joining on zone identifiers and reporting both orphaned and missing zones before anyone changes DNS. For an e-commerce product accepting customer domains, the deciding constraint is ownership: a customer pointing a domain at a storefront does not automatically make that customer's authoritative zone part of the platform's inventory.
Short answer: Compare only zones your platform manages; keep customer-owned zones outside the missing-zone denominator, and alert on mismatches without deleting anything on the first observation. A domain string can be re-pointed. Store the zone identifier as the join key.
The Node.js application can own the schedule and collect snapshots; the Python examples below isolate the collection and reconciliation decisions without assuming a vendor response schema. This is an inventory check with a narrow promise.…