Hosts File Hack
So you have ordered hosting and want to work on your new website however your domain name is still pointing to your old website which is with another web hosting provider.
Your new website is not finished yet so you don't want visitors to view it yet - but you need to see it while you are working on it!
You can solve this problem using what is typically referred to as a "hosts file hack".
Every operating system has a hosts file and one can use it to bypass the IP address that a live domain name is broadcasting.
By editing your hosts file you can trick your browser into thinking that a website is located at a different IP address (or web host).
Hosts File Hack For Windows10
Editing a host file is done a little differently depending on which operating system you are using. Here is how it is done in Windows 10.
- Click the Windows start icon and in the search box type in "NotePad". (On some computers right mouse click the start button to find the Search option)
- Don't click the NotePad icon though! Instead click "Run as administrator" or right mouse click the icon and choose "Run as administrator"
- Click "Yes" at the prompt
- The file you want to open is located here: C:\WINDOWS\system32\drivers\etc\hosts
- To find it click "File" - "Open"
- In the bottom right hand corner choose "All Files" (instead of TXT files)
- Then browse to the file and click it: drivers - etc - hosts
- Then click "Open"
Now that you have the hosts file open add a line that looks like this:
188.8.131.52 YOUR-DOMAIN-NAME-HERE.com.au www.YOUR-DOMAIN-NAME-HERE.com.au
and hit save!
if I was doing this for the computerjazz.net website I would enter:
184.108.40.206 computerjazz.net www.computerjazz.net
All you need to do now is close and then re-start your browser.
You should now be able to see your development website.
When you are done editing and want to see your live website repeat the process and disable the hack.
You can disable it by putting a hash in front of the line i.e.
#220.127.116.11 computerjazz.net www.computerjazz.net
Then save again, re-start your browser and your live website will load again.
Hosts File Hack For Other Operating Systems
You can do the same thing on Apple, Linux and Android devices.
Just search the internet and you will find HowTo guides for every operating system.