DynamicSiteName and SiteName – Which site a client computer belongs to?
Overview of DC Locator Service: When a client computer logs on to the domain, the DC Locator service running at the client computer tries to search the nearest Domain Controller by querying the local computer registry for DynamicSiteName. The site name is stored in a registry entry called “DynamicSiteName” at HKLM\System\CurrentControlSet\Services\Netlogon\Parameters key. DC Locator Service uses this information to query DNS Server to find the domain controllers in that site. It appends the site name to the query. If DynamicSiteName registry entry is not present or this is the first time a client computer is logging on to the domain, the DC Locator service sends out a domain-wide DNS query to find any domain controllers. Based on the subnet information, the DNS Server will return a list of domain controllers in a site closet to the client computer. After receiving response from the DNS Server, the DC Locator stores the Site Name information at the above mentioned registry key. Next time, DC Locator Service doesn’t send a domain-wide DNS query. Instead it uses DynamicSiteName to query the domain controllers in that site only.
If you want your client computers to belong to a specific site each time they log on to the domain, you should create the following registry entry on the local computer:
Value: After adding the above registry entry, the DynamicSiteName value is ignored. DC Locator Service always uses the value stored in SiteName registry entry to query the domain controllers in that site.