Home
 

Customer Support

Search for keywords:

Browse by category:

How do I change my hosts file? Or, how can I see my domain before DNS changes propagate?

To see your domain on our system before a DNS change takes effect, either:

1) Edit your hosts file on your PC.

If you are using Windows, use "Start", "Find", "Files and Folders" to find a file in your windows directory (or WINNT\system32\drivers\etc) called "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". Follow that format when you insert your domain and our IP.

On Windows98 and Windows95, the order may be 'hostname' then 'IP address'. On Windows2000 and WindowsME, the order is 'IP address' then 'hostname'

127.0.0.1 localhost

204.11.246.1 www.example.com


Then save this 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 "www.example.com", 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:

www.example.com 204.11.246.1


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: "204.11.246.1 www.example.com".

On unix-based systems, as well as OS X's terminal, you can find the hosts file at /etc/hosts.

2) Or use this other method instead.

Once you have modified your hosts file, you can flush your DNS so that you can see your new changes more quickly. Depending on your OS, there are different ways to do this:
  • For Mac OS X the command is:
    lookupd -flushcache
  • For Windows the command is:
    ipconfig /flushdns

User-Contributed Notes

add a note
anonymous -at- example.com
22-Jun-2006 03:22
Under Mac OS 9, the hosts file has to be named "Hosts" with a capital H.
Also, the entries in the file have to be of the form 
  domain_name  A  IP_address
  example.com  A  1.1.1.1

The OS 9  TCP/IP Control Panel has a "Select Hosts file" button. With
the use of this button, the hosts file can have any name and be located
anywhere. Also, TCP/IP will parse the hosts file for syntax when you
select the file with this button.

anonymous -at- example.com
22-Jun-2006 04:35
In the Mac OS 9 Hosts file, don't use leading blanks on the entry lines.
A leading semicolon or a leading blank is taken as a comment line. 

The Hosts file has to be a plain text file, so use SimpleText to edit
it.  

Whenever you change the Hosts file, it has to be reloaded into TCP/IP.
The basic way is to Restart the computer, but I found the combination of
these two actions also reloads the Hosts file (actually it may be that
only one of them is necessary, but I didn't try that): (1) Use the
Select Hosts File button in the TCP/IP Control Panel to choose the Hosts
file. (2) Use the Options button in the TCP/IP Control Panel, from which
you can make TCP/IP Inactive. Close the TCP/IP panel and Save when
requested. Then reopen the panel, choose Options again, and make TCP/IP
active again. Close and Save. In the Options, "Load Only when Needed"
works.

add a note

Related Questions:


Where can I see my website if my domain registration does not yet list the right DNS servers, or if I do not have my own domain name?

Can I have many domain names that all lead to the same website?

What are your DNS servers?

How do I transfer my site to MW with no downtime?

What is your IPS Tag for my co.uk domain?

My Control Panel password doesn't work on the Domain registration login.

Where can I get my own domain name?

I just transferred my domain and I either get an Error 403 when trying to go to it, or my site stays the same even though I have uploaded new files and made changes.

Can I have access to my zone file?

Why do you recommend against hosting my own DNS?

Do I have to have my own domain name to host with you?

What if I forgot my Network Solutions login?

How do I change my listed Nameservers (DNS) at Network Solutions?

Do you provide reverse DNS services?

Can You Provide Assistance in Migrating My Account from Shared Hosting to a VPS?

How do I transfer my shared hosting account to a VPS account with little to no downtime?

Why don't the serial numbers match on the nameservers for my domain?

Browse Categories:

Getting Started, FTP, Telnet/SSH, Moving Domains, E-mail, Traffic Reports, Mailing Lists, Apache, PHP, CGI, Other Server-Side Scripting, MySQL Database, Imaging Libraries, Other Software, Billing & Terms, Control Panel, E-commerce, Pre-Sales


Tiny Modwest Logo         Copyright 2000-2008 by Modwest, Inc.          About Us    |    Blog    |    Jobs    |    Web Design    |    Contact Us