Support Centre

Modifying the hosts file in Windows

Not enough ratingsNot enough ratingsNot enough ratingsNot enough ratingsNot enough ratings


Windows contains a file named "hosts" that allows you to override where your browser looks for a website. This is useful when you want to test a website on a new server before pointing a domain to that new location to make it live.

This file is normally located here on Windows XP and newer (Vista, 7, etc):
- C:\Windows\System32\drivers\etc\hosts

Or here on NT4 and Windows 2000:
- C:\WinNT\System32\drivers\etc\hosts

Normally, if you have not edited this file before, you will see a couple of existing entries that refer to localhost. This is normal and these should be left alone.

To preview your website, you need to enter the IP address of your new server followed by a space and then the address of the website, like so:

Replacing with the real IP address of your new server and with your domain name. Any additional domains you wish to use should be added individually on new lines at the bottom of this file.

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed