UK Sales: 0800 035 6364 | | We'll Call You

How to preview your website using your 'hosts' file

New and transferred domain names have a propagation period that can be anywhere from a few hours to a few days. During this period of time the new or transferred domain information propagates around the internet, and you can't see your new webspace.

Top Tip from 2020Media

If you need to preview your site immediately you can edit a file on your computer as a temporary work around.

Use your Hosts file

Windows contains a file called 'hosts' that will enable resolution of your domain name to the web server. Carefully edit this file using the following procedure.

1. Locate the hosts file on your computer

Navigate to the following directory using Windows explorer or similar:

Windows 95/98/Me c:\windows\hosts

Windows NT/2000 c:\winnt\system32\drivers\etc\hosts

Windows XP Home/Pro c:\windows\system32\drivers\etc\hosts

Windows Vista c:\windows\system32\drivers\hosts

Windows 7 C:\Windows\System32\drivers\etc\hosts

Note in Windows 7, you must open this with Notepad run as Administrator. To do this, click Start, click All Programs, click Accessories, right-click Notepad, and then click Run as administrator. If you are prompted for an administrator password or for a confirmation, type the password, or click Allow or Yes.

2. Open the hosts file for editing

Open your hosts file in Notepad. It should look something like this when you open it:

Hosts File example

Start a new line at the bottom of the file. To do so, click your mouse so that the cursor is at the very end of the last line and hit to start a new line.

Enter the following two lines of text like this example:

BUT, replace with the IP address of your new website space. To find this out, contact Customer Services.

Your Hosts file should looks something like this when you are done.

Modified Hosts File

Close the Hosts file and save it when asked. If your browser is currently open, close it so that the changes take effect . It is not necessary to restart your computer.

You should now be able to view and publish to your web site using your domain name.

2020Media is a leading provider of small business Wi-Fi hotspots. If you want to offer free Wi-Fi to your customers or users, our service could be exactly what you are looking for. Our Hotspots are managed in the cloud, ultra-reliable and give you loads of information about behaviour patterns of your users. Read More   Read more...
2020Media introduces Moodle Hosting - UK servers and UK Moodle experts setup your site ready to use. Read more...
Special Offer for Longer Registration Periods Register or renew a .com, .net or .org domain name for 5 years we'll include 1 year free*. Read more...
2020Media is now offering zero-click installation of the popular TYPO3 content management system. Read more...

Our blog is regularly updated with news, tips and industry opinion.


  • AggieWestons
  • baker-and-mckenzie
  • arts-council-england
  • Big Finish
  • barratt-developments-logo
  • City-of-Lincoln-council-logo
  • brora-logo
  • DenisMacShane
  • Construction-Industry-Council
  • colchester