You are not logged in. Please login or register.
Viewing Development Websites Using Your Hosts File
Web Hosting » Support » NuBlue Forums » How Do I? » Viewing Development Websites Using Your Hosts File
Posts [ 1 ]
Topic: Viewing Development Websites Using Your Hosts File
Editing your Hosts File in Windows XP
One method of previewing/developing a site that is not live (ie you're developing it on our server under its correct domain name, but the A record or nameservers point to a live site hosted elsewhere) is to edit your hosts file to bypass DNS and force your local machine to look for a domain on our hosting.
To do this you need to know your domain name, the IP address we're hosting it on (You can find this information in your Hosting Control Panel under Setup), and you'll need to have administrator privileges on your computer.
On Windows XP the hosts file is located within here : windows\system32\drivers\etc\hosts . The windows directory is most likely located on your C: drive, but if your computer setup differs from the norm it could be located elsewhere.
Navigate to this file in Windows Explorer, if you find you can't view any of the listed directories you will need to enable Hidden Program or System Files (See guide here. Once located right click and choose to edit the file in Notepad.
Append to the bottom of the file the following 2 lines, replacing IP_ADDRESS with the IP Address you took from the Hosting Control Panel and DOMAIN_NAME with your domain :
IP_ADDRESS DOMAIN_NAME IP_ADDRESS www.DOMAIN_NAME
Here's an example using my domain name and using my correct IP address :
92.63.138.66 pagrant.co.uk 92.63.138.66 www.pagrant.co.uk
Save the file and you're done (If you can't save the file then you won't have administrator privileges and you'll need to login as an administrator account). To test ping your domain and it should return the IP address you entered in the hosts file, not the live IP address.
To reverse, simply delete the two lines, save, flush your dns (ipconfig /flushdns in a command prompt) and retest using ping.
Posts [ 1 ]
Web Hosting » Support » NuBlue Forums » How Do I? » Viewing Development Websites Using Your Hosts File







