See (stage) your website before switching your DNS

BackendGeneral TopicsServer Side Programming

When customers are looking to switch hosting providers, they usually stage the setup of their web site before completely switching the DNS (domain name servers). We provide you with a temporary URL so that you can see how your site will look before you switch your domain’s DNS. The problem comes when some scripts require you to access the script through a valid domain name. This poses an issue because you haven’t switched the domain’s DNS and don’t want to until you know the script works 100%. Here is an easy work around:
1) Upload your site / databases, etc to your new web hosting account. 2) Locate your hosts file on your computer (On Windows XP, it’s located at C:\WINDOWS\SYSTEM32\DRIVERS\etc\HOSTS) and add the following line at the end of the file: IP_ADDRESS    www.yourdomain.com yourdomain.com Obviously change the IP_ADDRESS and yourdomain.com to the appropriate values. The IP_ADDRESS can be found in your welcome e-mail and also inside of your cPanel account. 3) Hit save, close all your browsers. That’s it. Also Read : How to redirect HTTP to HTTPS Using htaccess
Now when you load your web site from your computer, you will be able to see your site as if the DNS was pointed to our servers. You can fully stage the setup and ensure all components of your site are in working order. The rest of the world will still be loading from your actual server (since you did not change the domain’s DNS).  You can remove the line in the hosts file whenever you’re done staging and your computer will reference your ISP DNS servers as usual.
       

Advertisements

ads