How Do I Change my Hosts File?

You can see your domain using different DNS settings without actually changing the DNS records in the Nameservers.

To do this, you change the Hosts File on your computer. This means that your computer follows the DNS settings in your Hosts File over what's in the live Nameservers of the domain.

This is useful for previewing a website that's been published before the DNS settings in the Nameservers have been changed.

Step By Step Guide

1:
Firstly navigate to C:\WINDOWS\system32\drivers\etc and you will see a file named "hosts". Verify that the file is not "read only" by right clicking it, and choosing it's Properties. Then open the file for editting with Notepad. There should already be an entry for "localhost".


2:
Follow that format when you insert your domain and a new IP.


3:
On Windows98 and Windows95, the order may be 'hostname' then 'IP address'.

On Windows2000 and WindowsME, the order is 'IP address' then 'hostname'.

Then save the altered hosts file and close notepad. Make sure Windows did not silently save the file as "hosts.sam". The filename has to be "hosts". You may also need to reboot for the change to take effect.

Next time you try to go to the domain you've changed the hosts file for, your browser will try to find that domain at the corresponding IP instead of looking up the IP through DNS.

Mac OS 9's hosts file format is based on RFC-1035. Mac OS 9 keeps its HOSTS file in the Preferences folder under the System folder. Edit this file and add a line for each host that you would like to map an IP to.

To find the hosts file in OS X's graphical interface: 1. Open Finder. 2. In the Go menu, select "Go to Folder" 3. Type /etc for the folder name. 4. In the list of files that appears, you should find hosts. Double click it to open it in a text editor. 5. As in the earlier examples, the format of the file is: "00.000.000.00 www.example.com". On unix-based systems, as well as OS X's terminal, you can find the hosts file at /etc/hosts.

© Copyright 2024 Toolkit Websites LtdWeb Design By Toolkit Websites