SimplyWebHosting.com KnowledgeBase Glossary    Contact Us
Search  
   
Browse by Category
SimplyWebHosting.com KnowledgeBase .: Shared Web Hosting on Plesk Servers .: How do I edit my hosts file in Windows XP?

How do I edit my hosts file in Windows XP?

To view your domain before you update your name servers at your registrar, you will want to temporarily put an entry for your domain and its IP address in the "hosts" file for your computer. For a Windows XP system, the file is located at c:windowssystem32driversetchosts. Other operating systems may have the hosts file in a different location, use a different file or may not have it at all. Open the hosts file in a text editor like notepad.

A typical Windows XP hosts file will initially look like this:

# 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

You'll want to add a few lines at the bottom of the file as follows:

# 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
123.123.123.123 yourdomain.com  #(you can add a description here)
123.123.123.123 www.yourdomain.com

Replace 123.123.123.123 with your real IP address and yourdomain.com with the real address of your site. If you want, you can also add a description for each site after a '#' symbol after each site (refer to the above example).

This will force your computer to look at your new site when you use the name of your domain, instead of looking at your old site.

Important: Make sure that about a week after updating your DNS at your registrar that you remove the entry from the hosts file so you are able to access the new site normally. Failure to do this may cause problems in the future if your site changes its IP address.


How helpful was this article to you?

Related Articles

article How do I perform a traceroute in Windows XP?
Click on the Start menu.Click on Run.In the...

  5-5-2006    Views: 8277   
article How do I change file permissions in Plesk 5?
You can change the permissions for files using...

  1-5-2006    Views: 4994   
article Is it possible to run Microsoft Access on my server?
It is not possible to run Microsoft Access...

  7-19-2005    Views: 13918   

User Comments

No comments have been posted.


.: Powered by Lore 1.5.4
Copyright 2005-2014 Advantagecom Networks, Inc.
SimplyWebHosting.com - Xen Linux Virtual Private Servers (VPS) - Paypal Accepted