How to Change Your Host File E-mail

Sometimes your website will be built at the same domain name while your old site is still up. In order to resolve conflicts with your DNS, you may need to change a file on· your computer to "trick" it into thinking your domain is being hosted elsewhere. Well, technically it is being hosted elsewhere, simultaneously at two different servers in fact. There's a small file on your computer that can override what all the rest of the computers in world are doing; this is called the "host" file. It's good to know it's there in case you don't like all the other computers and need to march to your own drum, so to speak.

To edit this tiny little file you'll need administrator rights to your computer, a screwdriver, a beer of your choice and several hours -- oh wait! That was for assembling your file cabinet.

To Find and edit your host file

Everything you need to edit your host file is already on your computer and will only take a minute or two.

If you're using Vista or Windows 7, open up the program called "Notepad." You can find this under the "Accessories" folder in your start menu. Before opening the program, right-mouse click "Notepad" and left-mouse click "Run as administrator." You need administrator privileges to edit this file. Once you have Notepad open as an administrator (windows XP can just open normally), navigate to the following path to find your host file.

c:/Windows/System32/drivers/etc/hosts

In order to see the file, you may have to adjust Notepad to see ALL Files, and not just text files.
Once open, you will see some text. Depending on your operating system, and Notepad version, you may see something different. Here's an example of what mine looks like:


# Copyright (c) 1993-2009 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


Go to the very bottom and hit RETURN

On a clean line type the following:

207.58.149.76 www.yourwebsite.com
or
207.58.149.76 yourwebsite.com

Depending on how your old site is setup, it may be possible to see both sites by just omitting the "www" in the browser address.

BTW: Don't delete anything. All· you're doing is adding this one line at the very bottom of the file. Save the document. Be sure Notepad doesn't save it as a .txt or .sam type of file. The name needs to stay the same. "hosts"

To see your old website, all you need to do is put the number symbol in front of your last entry and click save.

#207.58.149.76 www.yourwebsite.com

This way, in order to re-enable your change, all you need to do is delete the # and click save again.

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: 207.58.149.76 www.yourwebsite.com

If you're on an older computer, you may have to reboot to see these changes take place. Good luck, and my the force be with you.

 
Home Tutorials Joomla Domain/Hosting How to Change Your Host File