Temporary website access before DNS change

Temporary access to your site can be useful if you want to develop it prior to changing over the nameservers and setting it live, to do this you should use the following method. The HOSTS file takes the structure of the IP address you wish to point to followed by the hostname you are mapping to it. E.g.

10.20.30.40 nethosted.co.uk www.nethosted.co.uk

This format remains the same across operating systems, however the location of the hosts file does vary. Here is where you can find it on different operating systems:
» Windows 95/98/Me: c:\windows\hosts
» Windows NT/2000/XP Pro: c:\winnt\system32\drivers\etc\hosts
» Windows XP Home: c:\windows\system32\drivers\etc\hosts
» Windows 7: c:\windows\system32\drivers\etc\hosts
» Mac OS X: /private/etc/hosts
» Linux: /etc/hosts

On Windows 10 (and Vista/7/8/8.1) you need to edit the file with administrator rights:

  1. Start Menu -> Search for Notepad
  2. Right click Notepad and choose "Run as administrator"
  3. Click Continue on the security prompt
  4. Select File -> Open
  5. Browse to: C:\Windows\System32\Drivers\etc
  6. Change the file filter selection from "Text Documents (*.txt)" to "All Files (*.*)"
  7. Select the "hosts" file and Open
  8. Make the changes that you require and save the file.

For OS X or Linux you should edit this file with your favourite text editor from the root account.

Using this method can save you a lot of headaches in the site development process, and offers you the flexibility to develop your site from anywhere without having to mess about with changing the DNS servers on your web hosting. It also removes the need to consider DNS caching and propagation. This method works for any kind of hosting you have, be it linux hosting, reseller hosting or VPS hosting.

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Problems accessing your website

If you cannot access your site but you can view other sites the first thing you should check is...

Buying an SSL certificate

An SSL Certificate creates a private channel which encrypts the data throughout transmission, and...