The Server Pages


TheServerPages Articles





Checking your site before it goes live [Windows]

Author: Wojjie     Posted: 2005-04-16     Viewed: 12,389


You want to test out your website before the domain resolves but are not sure how to do it. One way is to request a temporary subdomain from your host, or to setup your machine to resolve the domain to the correct IP before the actual DNS servers are updated. This article does just that, it tells you how to edit your hosts file.

1. Click: Start -> Run
2. Type this into the 'Open' text box and hit 'OK' afterwards (replacing the '[Path To Windows]' with the location of your windows directory:
[Path To Windows]\system32\drivers\etc\
3. Double click the 'hosts' file.
4. Select the 'Select the program from a list' option in the window that pops up.
5. Now choose your favorite text editor, such as WordPad, and hit 'OK'.
6. The editor should open up with the contents similar to:
# 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:
#          # source server
#              # x client host       localhost
7. Add a new line to the file following the follow format:
(IP Address)	(Domain Name)
So if your domain name is '' and the ip is '', you would add something like this:
8. Now save the file.
9. To test this out you may need to restart your computer, or just close all your browser windows first.


Copyright © 2004-2015: