Preload the client resolver cache

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

To preload the client resolver cache

  1. At the client computer, open Command Prompt.

  2. At the command prompt, type the following command:

    notepad %systemroot%\system32\drivers\etc\hosts

  3. Using the default entry in the file (a mapping for the local host to the loopback IP address,, add additional host name-to-address mappings on separate lines to be preloaded into the resolver cache of the client. For example, you might add:  host-a

  4. On the File menu, click Save, and then Exit.

  5. As an option, you can verify that your changes have been updated in the resolver cache by viewing its contents.


  • To perform this procedure, you must be a member of the Administrators group on the local computer, or you must have been delegated the appropriate authority. If the computer is joined to a domain, members of the Domain Admins group might be able to perform this procedure. As a security best practice, consider using Run as to perform this procedure.

  • To open a command prompt, click Start, point to All programs, point to Accessories, and then click Command prompt.

  • To open Notepad, click Start, point to All programs, point to Accessories, and then click Notepad.

  • Entries you add are always answered first from the local resolver cache and not sent to the DNS query when queries are made locally to resolve these names to host (A) resource records.

  • Every line in the Hosts file should contain an IP address followed by one or more host names. For example, you could add a line such as the following with an IP address ( that maps to more than one DNS host name:  host-a

    Likewise, a single DNS host name can correspond to more than one IP address if each of the addresses is mapped and used in separate lines. For example, you could add lines for the following multi-homed or multi-addressable DNS host computer:

  • When multiple names or IP addresses are used in the file, the DNS Client service must be running for all entries to be returned or used in answering queries. If the DNS Client service is not running, only the first entry in the file is used to resolve the query.

Information about functional differences

  • Your server might function differently based on the version and edition of the operating system that is installed, your account permissions, and your menu settings. For more information, see Viewing Help on the Web.

See Also


How DNS query works
Display and view a client resolver cache using the ipconfig command
Client features