|
Exchange - Net Admin - Outlook Windows Mobile - Windows
Contact - Director's Blog 
Network Admin Home
Branding "System Properties" with Your Own Information ... Win XP, 2000 and older ... Vista
Changing ISPs Plan
Changing Internal IP Addresses Plan
Custom Text on the "Workstation Locked" Screen
Downloading a Complete Internet Explorer Installation
Group Policy Admin
Login Scripts
Limiting the Number of Logins a User Can Make
NETBIOS Alias
Recovery Console
Reset Administrator Password
Run As
Subnet Masks
Uptime Statistics
Using NetMeeting for Remote Control
Viewing Printers in a Web Browser |
Network Administration Page Last Reviewed: 02/02/2010
Windows Hosts File
If you are trying to resolve an external name to a local machine - for example your web site, and you don't have your own internal DNS server, then you should create a "hosts" file for each machine. A hosts file is like a local DNS server. It can have different information on what to resolve names to than is on the public Internet. If you on a corporate network you should check with your network admin to ensure that hosts files are not already in use.
If you have an internal DNS server, then a Hosts file should NOT be used. Use split DNS instead.
To create or modify a hosts file, follow these easy instructions:
- Search your system for either "hosts" or "hosts.sam" (which is a sample file). You DO NOT want lmhosts or lmhosts.sam.
- If you don't have a hosts file, then you should rename the "hosts.sam" file removing the ".sam" suffix. A "hosts" file doesn't have an extension.
- Open the "hosts" file in notepad. The easiest way to do this is to hold down the shift key and then right click on it. You will then get an option "Open With..." where you can choose "Notepad".
- Once the file is open, you will see the format that you need to make entries. Enter the IP address first, then a tab, then the name. Once complete, save the file. Leave it open while you test it.
- To test your file, open a command prompt and enter "ping <name entered>" minus the quotes, where <name entered> is the name you just put in to the hosts file. You should find that it resolves to the local IP address instead.
- You can make additional entries, you can even have multiple names for the same IP addresses.
Here is an example hosts file with some entries already made:
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
127.0.0.1 localhost
192.168.0.1 www.example.com
192.168.0.1 ftp.example.com
192.168.0.2 printer
|