wiki:faq/domain/modify-hosts-file

Version 3 (modified by Jamie McClelland, 4 years ago) (diff)

--

How can I test my new web site before changing my domain to point to May First/People Link servers?

It is very common to create a new web site with a temporary domain name (like example.mayfirst.org), while your main site (example.org) is hosted somewhere else.

Before changing your DNS settings to point your domain name to the new site, you may want to test to make sure that our servers are properly configured to display your new web site with your main domain name.

You can do that modifying the hosts file on your own personal computer.

The hosts file is a simple text file found on most operating systems. When your computer looks up a domain name, it first checks to see if the domain name is listed in your hosts file. If it is listed, it will use the IP address supplied by your hosts file. If it is not listed, then it will conduct a regular DNS query to find the correct IP address.

The location of your hosts file will depend on your operating system. The Wikipedia article on hosts file contains a useful section to help you find the location of your hosts file.

Once you have located your hosts file, you can edit it in any text editor (like notepad, but not like Microsoft Word or OpenOffice). Add a line to the file that includes the IP address of the May First/People Link server hosting your site followed by your domain name. To find out the IP address, login to the members control panel and look for the IP address in parentheses following your primary host.

For example, if your IP address is 209.51.163.199 and your domain is example.org, you would put the following line in:

209.51.163.199 example.org

You may need to restart your web browser for the changes to be picked up.

Don't forget to remove the line when you are done testing!