The Server Pages

»

TheServerPages Articles

»

Webmasters

»

Design

Checking your site before it goes live [Windows]

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

Introduction:

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.


Instructions:
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:
#
#      102.54.94.97     rhino.acme.com          # source server
#       38.25.63.10     x.acme.com              # x client host

127.0.0.1       localhost
7. Add a new line to the file following the follow format:
(IP Address)	(Domain Name)
So if your domain name is 'exampledomain.com' and the ip is '192.168.0.1', you would add something like this:
192.168.0.1	exampledomain.com
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.


Comments

Copyright © 2004-2015: TheServerPages.com