An A record resolves a host name to an IPv4 address; a PTR record resolves an address back to a name. They are separate DNS objects, so changing one does not prove that the other is correct. This procedure covers a controlled change on Windows DNS Server.
Confirm record ownership and the authoritative zones
Identify the forward zone, authoritative DNS server, current address and the reverse zone that owns the address. Some records are maintained by DHCP or a domain-joined computer. A manual edit to a dynamically managed record may be overwritten at the next registration. Confirm who owns the change before proceeding.
For public addresses, reverse DNS is commonly managed by the address provider. Creating a PTR record on an internal DNS server does not change internet-visible reverse DNS. Request the public PTR change from the responsible provider when that is the actual requirement.
Inspect and save the existing values
Use the DnsServer module from a suitably delegated administrative session. Save the existing data and TTL before changing anything. These examples use a nonproduction documentation address and an example internal zone.
Get-DnsServerResourceRecord -ComputerName 'DC01' -ZoneName 'corp.example' -Name 'app01'
Resolve-DnsName app01.corp.example -Server DC01Add a new A record and its PTR
Create the reverse lookup zone first if you administer it and the approved design requires it. The CreatePtr switch attempts to create the corresponding reverse record; the reverse zone must exist and permissions must allow the operation.
Add-DnsServerResourceRecordA -ComputerName 'DC01' -ZoneName 'corp.example' -Name 'app01' -IPv4Address '192.0.2.40' -CreatePtrChange an existing address without discarding its other properties
Retrieve the specific existing record, clone it and change its IPv4 value. A name may have multiple A records, so inspect the result before selecting a record to edit. Do not blindly update the first object in a multi-address service.
$old = Get-DnsServerResourceRecord -ComputerName 'DC01' -ZoneName 'corp.example' -Name 'app01' -RRType A
# Continue only after verifying that $old identifies the intended single record.
$new = $old.Clone()
$new.RecordData.IPv4Address = [System.Net.IPAddress]::Parse('192.0.2.41')
Set-DnsServerResourceRecord -ComputerName 'DC01' -ZoneName 'corp.example' -OldInputObject $old -NewInputObject $newVerify both directions and the application
Query the authoritative server first, then test from representative clients. Cached answers can remain until their original TTL expires. Check the old and new reverse addresses separately, because updating the forward record does not automatically remove every obsolete PTR.
For a controlled /24 reverse zone, a PTR for 192.0.2.41 belongs under the label 41 in 2.0.192.in-addr.arpa. Other reverse delegations can use a different structure; follow the actual zone design rather than assuming every network is a /24.
Resolve-DnsName app01.corp.example -Type A -Server DC01
Resolve-DnsName 192.0.2.41 -Type PTR -Server DC01Rollback and common mistakes
Restore the original A and PTR values if the application does not function through the new address. Account for cached answers during both the change and rollback. Check load balancers, certificates, firewall rules and application bindings independently; a successful DNS lookup is only one part of a working migration.
For syntax details, see Microsoft’s DNS record creation reference and PTR record reference.
How to Install the DNS Server Role with PowerShell
How to Install the DNS Server Role with PowerShellApplies to: Windows Server 2019, 2022 and 2025.Windows DNS Server can host authoritative…
How to Create an Active Directory-Integrated DNS Forward Lookup Zone
How to Create an Active Directory-Integrated DNS Forward Lookup ZoneApplies to: Windows Server 2019, 2022 and 2025.An AD-integrated zone…
How to Create a Reverse DNS Lookup Zone and PTR Records
How to Create a Reverse DNS Lookup Zone and PTR RecordsApplies to: Windows Server 2019, 2022 and 2025.Reverse zones map IP addresses to…
How to Configure DNS Forwarders on Windows Server
How to Configure DNS Forwarders on Windows ServerApplies to: Windows Server 2019, 2022 and 2025.Forwarders send unresolved recursive…
How to Configure a Conditional DNS Forwarder
How to Configure a Conditional DNS ForwarderApplies to: Windows Server 2019, 2022 and 2025.A conditional forwarder routes queries for one…