Editing your Hosts File using Windows 10
Posted by Maria Brosnan on 27 June 2016 05:02 PM

You can find the IP address of your website in your hosting plan's setup email.

The hosts file is a file on your computer used by the operating system to map hostnames to IP addresses.
You can use this file to preview your website on a server before making your website live.

  1. Click on the Start menu and search for Notepad.
  2. Right click on the Notepad icon and select Run as Administrator.
  3. Click Yes if the 'Do you want to allow the following program to make changes on this computer?' dialog box appears.
  4. When Notepad opens click File -> Open.
  5. Navigate to the path where your hosts file is located, which should be: C:\Windows\System32\Drivers\etc\hosts and click Open.
  6. If you find that the \etc folder is empty you may need to select the option to show hidden files. You may also need to change the file type to All Files to be able to see the hosts file.  To do this, click on the drop-down list at the bottom of the Open dialog box and change it from 'Text Documents (*.txt)' to 'All Files (*.*)'.  Select thehosts file and then then click the Open button.
  7. The hosts file will contain some comments (lines starting with the # symbol), as well as some default hostname mappings e.g. 127.0.0.1 - local host. Add your website's IP address and your domain name on a new line as below...
# 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
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
123.45.67.89 example.co.nz www.example.co.nz
  1. When you are finished editing the hosts file, click File -> Save.
  2. To exit Notepad, click File -> Exit.

The new changes should now take effect.

If you have any difficulty please contact Support.