Viewing your website before domain propagation

Another use for this tip is if you want to work on a website but aren't ready to change the nameservers and point it to the new host until you finish your work on it. With this trick, it's possible to view a site on another server without having to wait for the domain propagation to happen!
The first trick is the easiest by far, all you need to know is the IP of the server your site is now on and you just go to this website and you can preview your site before your dns (nameservers) have propagated!
In windows, the file to edit for this is called the Hosts file, it's located here usually:
C:\windows\system32\drivers\etc\HOSTS
Open this file in note pad or any text editor and add the following info at the end of the file:
xxx.xxx.xxx.xxx www.yourdomain.com
xxx.xxx.xxx.xxx yourdomain.com
The Xs reprensent the IP of the new server and of course you'd replace "yourdomain.com" with your domain name. Save your file after your changes.This will allow you to view your website on the new host but remember, you're the only one that's viewing it there, the rest of the world is still viewing it on the old host until the domain propagates throughout the web.
To reverse this you simply open that file again and remove your entries. You can have more than one set of entries, if you need to create more, just enter them one bellow the other.
In OSX it's a bit different but here is the command you would type in the terminal:
sudo echo "xxx.xxx.xxx.xxx www.yourdomain.com" >> /etc/hosts
Labels: domain not propagated, viewing domain before propagation, viewing site before domain propagates, website tips
If you would like to give a little something, you can use the paypal button below:
0 Comments:
Post a Comment
<< Home