This is not an expected behavior from Windows Server by itself. When DNS settings revert automatically, something is enforcing or overwriting the configuration.
The most common causes are DHCP, Group Policy (GPO), or some management script/service. If your network adapter is set to obtain settings automatically, a DHCP server can push DNS values, and Windows will reapply them after a few minutes even if you change them manually.
Start by checking whether DHCP is enabled:
ipconfig /all
If you see “DHCP Enabled: Yes”, then the DNS is likely coming from the DHCP server. In that case, either fix the DNS settings on the DHCP scope or switch your server to a static IP configuration.
To prevent overwriting, set a static configuration:
ncpa.cpl
Open your network adapter properties, go to IPv4, select “Use the following IP address” and “Use the following DNS server addresses”, then set 127.0.0.1 or the server’s own IP.
If it is already static and still changes, check for Group Policy:
gpresult /h C:\temp\gpo.html
Open the file and look for any policies applying DNS or network settings. This is very common in domain environments.
You can also inspect and set DNS via PowerShell:
Get-DnsClientServerAddress
Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses 127.0.0.1
If the setting still reverts after that, then something external is enforcing it, most likely GPO, DHCP, or a management agent.
If this server is a Domain Controller, using 127.0.0.1 or its own IP as the primary DNS is correct. The real issue is identifying what is overriding your configuration, not the value itself.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin