VDS Sphera Knowledge Base

Main / Browse Categories / Domain Names & DNS / How can I modify the hosts file on my PC?

Print article Print Article    Email article Email Article

How can I modify the hosts file on my PC?
Try to locate any existing hosts file on your computer:
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
(you may need administrator access for Windows NT/2000/XP)

NOTE: Hosts is the name of the hosts file and not another directory name. It does not have an extension (extensions are the .exe, .txt, .doc, etc. endings to filenames) and so appears to be another directory in the example above.

CAUTION: We recommend that you back it up onto a thumb drive or into another directory on your hard drive so that you may restore it if you do not like the results, or in case something else goes wrong while you are trying to set this up. It is always better to be safe than sorry in the event of an unforeseen mishap. Please make a backup copy.

Open your hosts file in Notepad. It should look something like this when you open it:

# 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: 
# rhino.acme.com # source server 
# x.acme.com # x client host localhost
You can now add addresses to your Hosts file. For example: hardhathosting.com www.hardhathosting.com google.com www.google.com
Once you make your changes, save the hosts file and restart your web browser.

User Comments
How can I modify the hosts file on my PC?  
There are no user comments for this topic.

No attachments.

Related Articles
 How do I create a new domain? (Accounts created before Dec 06)
 How do I create a new domain? (Accounts created after Dec 06)
 How do I create a sub-domain? (Accounts created before Dec 06)
 How do I create a sub-domain? (Accounts created after Dec 06)
 Is it possible to host domains with foreign extentions (i.e. .nl .co.uk .hu)?

Why Choose Our Hosting?

  • Unmatched Customer Support!
  • Virtual Private Server technology provides a rich, dedicated-like environment for every account.
  • We are known for our superb quality, performance and flexible hosting environment. We manage the server, software, and network you do the rest.
Continue reading »

Featured Hosting Plan

Learn more about our VPS Extreme

What is Included?

  • PHP 5.3.x/MySQL 5.1.x
  • Parallels® Plesk Panel 11
  • Unique IP Address
  • Daily VPS Backups (Off Server)
  • SAS Hardware Raid diskspace
  • CentOS 6 x86_64 bit
  • Multi-homed Tier 1 Bandwidth
  • Full Upgrade capabilities
Continue reading »