Browse To Your New Hosting Platform Without Changing Nameservers


Sometimes people will sign up with a new web hosting service and want to be able to work on the page at their new host while leaving their website active at the old host. Most web hosting companies will provide a temporary URL that will allow you to see your site, however due to the nature of the URL, which is usually http://IP_address/~username, some website material such as WordPress can not be viewed properly. This is because these website programs require the actual URL to function properly and be viewed correctly rather than simply an IP address. There is a way, however that you can make your local computer think that the domain name is pointed at your new web host so that you can view it just the way everyone else will once the domain’s nameservers are changed to point to the new server. This method will work much better than a temporary URL.

Server IP Address

You will need the IP address of the server where your website is hosted. You can either contact your webhost provider or go to to find what that IP address is.

The Hosts File

In order to change the location your local computer will look for any given domain name is in a file called hosts. This tutorial will first show what changes are needed to make to the hosts file to accomplish our goal and then show exactly how to edit the hosts file for either a Linux based system or Windows. Once the file is open near the end just add the IP address of the new server and domain name you want your computer to think is at that server.		localhost
#Add IP address and domain name after the localhost line.

Now anytime I want to go to my browser will send me to as the IP address of this site.

Mac or Linux

  • Edit /etc/hosts and add the ip address of the server you want to edit the site for and the domain name you want to use to access.
  • Note 1: you will need sudo privileges to edit this file.
  • Note 2: you can use any plain text editor you like to open the file /etc/hosts.


  • Step 1: Open your Windows start menu, search for the notepad application and then right click the notepad icon.
  • Step 2: Choose “Run as administrator” and then, while using notepad, browse to folder (/windows/system32/drivers/etc) that contains the hosts file.
  • Note 1: If the file doesn’t allow you to edit it, or whenever you save the hosts file it saves as a text file instead; you will need to right click and check the preferences for the file to make sure the read-only option is turned off.

Comments are closed.