RSS Directory

I manage web hosting on two different servers with 12 different IP addresses. Recently, I moved one site I own from one server to another. I updated the nameserver from my Godaddy account, which is where I purchased the domain name, but it can take 24-48 hours for the nameservers to propagate before the site will come up from its new location.

The problem is that I needed to start working on the new site right away, and did not have time for the nameservers to propagate. That’s when I had to solve this issue myself.

With Windows, you can specify the mappings of IP addresses to host names. This way, your browser will pull the domain from the IP address you specified, so you can start using a site even before all the nameservers propagate. Here’s how it works:

Browse to C:/Windows/System 32/Drivers/Etc/hosts. You can open the file “hosts” with a text editor such as Notepad.

For example, let’s say sitefever.com was hosted on a server whose IP address was 12.345.678.901, and I decided to change my web host. Now, the new IP address is 66.117.3.249 and I want to start working on my site right away, but when I type http://sitefever.com into my browser’s address bar, it keeps taking me to my old host at 12.345.678.901 because the new nameserver has not propagated yet.

You can open the file mentioned above and type:

66.117.3.249 sitefever.com
66.117.3.249 www.sitefever.com

Save and close the file. What you just did was tell your computer that if you type sitefever.com or www.sitefever.com, you want it to point you to the IP address 66.117.3.249.

You can immediately open your browser, type in your domain name, and you will be taken to the location on your new host! Now you can start working on your site at its new location immediately, without having to wait on the nameservers to propagate.

I know that this little trick has helped me a few times in the past. Maybe it’s something that you can keep handy which can help you one day as well.


Category: Tutorials
Article posted by: Neon on September 10th, 2007



Trackback URI | Comments RSS

10 Comments to “Don’t Have Time To Wait On Nameservers?” »

Comment by Dana Wallert
Sep 10 2007 at 2:46 pm

I actually just learned this trick a few months ago, and it has saved me a lot of time and frustration! Brilliant idea to share it with everyone :)

(Comments wont nest below this level)
 
Comment by Andrew Christiansen
Sep 11 2007 at 12:42 am

Very informative, thank you :)

(Comments wont nest below this level)
 
Comment by samuro
Sep 11 2007 at 3:55 am

I just know about this. Nice tips and thanks for sharing!, because 24-48 hours felt too long for waiting…

(Comments wont nest below this level)
 
Comment by Blogs for Money
Sep 11 2007 at 7:11 am

This is more useful than just being impatient. It lets you test your site as it’ll appear before even starting the domain transfer. You can bulid the site and test it with the correct domain making sure all links work etc., without having to send visitors to it.

Once you’re happy, set the domain transferring.

If you can make your site work on a different domain (eg. www2.mydomain.com) you can get it up and running, and when you re-point the domain, also add an index page to the oldserver that redirects to www2.mydomain.com. That way, people hitting the oldserver will be redirected to the temporary www2 subdomain at your new server while the domain propogates. Once it’s complete and everyone is hitting the new server naturally with www then you can remove the www2 subdomain to ensure Google doesn’t pick it up. (You could conditionally feed a robots.txt to block it – but that’s more complicated since you don’t want it appearing for the www subdomain on the new server!)

(Comments wont nest below this level)
 
Sep 16 2007 at 2:19 am

[…] presents "Don’t Have Time To Wait On Nameservers?" saying: "The problem is that I needed to start working on the new site right away, and […]

(Comments wont nest below this level)
 
Comment by HMTKSteve
Sep 17 2007 at 1:20 pm

You can also use this to block ads. Just point the ad server to 127.0.0.1

(Comments wont nest below this level)
 
Sep 18 2007 at 7:36 am

[…] thanks to Sitefever.com for reminding me about the awesome nature of the hosts […]

(Comments wont nest below this level)
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> in your comment.

© 2017 SiteFever.com c/o Neon.