Changing the primary DNS suffix of a Windows 2008 / Windows 7 system


When a Windows 2008 or Windows 7 system joins an NT-compatible (Samba 3) domain, the primary DNS suffix on the system is always set to the name of the Samba domain and cannot be subsequently changed.

Error changing DNS_Namens for the primary domain of this computer to "<New Domain>". Name "<OldDomain>" is maintained.
The specified domain either does not exist or could not be contacted.


The primary DNS suffix can be changed using a local policy. The following steps are required for this:

  • Start the ?Editor for local group policies? via ?Start? -> ?gpedit.msc? (alternatively via the prompt or Windows PowerShell).
  • Navigation in the following tree: ?Computer configuration? -> ?Administrative templates? -> ?Network? -> ?DNS client?.
  • Open the ?Primary DNS suffix? policy.
  • Enable the policy and enter the DNS suffix in the provided field.
  • Save the policy with ?OK? and restart the system.