When you transfer a working website from one server to another, it is mandatory to test whether the site is working perfectly on the new server before updating the DNS records. Otherwise, your website may be not functional for a long time which affects on site performance. In this tutorial, we will guide you to transfer site from one server to another server without any interruption.
Basically, the website can be checked using the temporary URL (http://server_ip/~cpanelusername/
) on cPanel before switching DNS. But for security reason, many hosting providers don’t allow to access the website via server IP address or temporary URL. Due to this, mod_userdir is disabled and you don’t have permission to enable it on your shared hosting. However, there has another option to test your website before pointing domain name or update DNS records with the new server.
Using the Hosts file, you can map the hostnames to the IP address on your computer. It will help you to work on the new server with your domain name, and rest of the users will be pointed to the old server.
Follow the below steps to access the website without domain name assigned using server IP address.
IP_Address domain_name.com IP_Address www.domain_name.com
Note that: The server IP address can be found in the email received from your hosting provider on the purchase. Also, you’ll find the server IP in your hosting cPanel.
Now the specific IP will overriding actual domain name DNS and you will be able to access your website on new hosting server from your local computer. Once your website working properly on the new server, your can update the DNS records to point your domain to the new server. Following this way, the migration from one server to another will not be affected your website performance.
Do you want to get implementation help, or enhance the functionality of this script? Click here to Submit Service Request
How can we access VPS without domain?
i have one problem there are no hosts file or hosts folder in my etc folder so please tell me what is the extension of host file?
thanx really good