Portal Home > Knowledgebase > cPanel > How can I test or preview my website before switching DNS?
How can I test or preview my website before switching DNS?
There are a few different ways to preview your site before DNS resolves. This will allow you to fully test your site before your DNS servers update.
Basic Sites - Temporary URL
For basic sites which do not need to use the URL i.e. HTML / Basic PHP pages, you can use the temporary URL below.http://X.X.X.X/~username
You will need to replace username with your actual account username and X.X.X.X with the IP address of the cloud that your account is on. You can find this information in your Welcome e-mail. Example below:
Server Name: securecloudserver.info
Server IP: 220.127.116.11
If you are using an exisiting domain with your new hosting account, you will need to update the name servers to point to the name servers listed below.
Nameserver 1: ns1.securecloudserver.info
Nameserver 2: ns2.securecloudserver.info
Nameserver 1: ns3.securecloudserver.info
Nameserver 2: ns4.securecloudserver.info
As a reseller you can also setup custom name servers. Simply point your A record to 18.104.22.168
We would also advise that GLUE records be published for all custom name servers. We can do this for you, simply submit a support ticket and at no cost we will setup your custom name servers.
More Complex or Content-Managed Sites - Host File
In the event your site needs to use the domain name to operate i.e. Wordpress / Joomla / Magento, you can use a local host file method.
1. Locate the HOSTS file on your computer. Typically it is in one of the following locations:Windows NT/2000/XP/2003/Vista/7 - C:\\windows\\system32\\drivers\\etc\\hostsWindows 95/98/Me - C:\\windows\\hosts2. Open this file with a text editor such as Notepad or Wordpad (in later versions of Windows, you may need to run Notepad as an administrator to gain access to the file.3. Once the file is opened, consider performing a "Save As" so you have an original copy of the file that you can restore later. You will see two columns of information, the first containing IP addresses and the second containing host names. By default, a windows hosts file should be similar to the following:
You can add additional lines to this file that will point requests for a particular domain to your new server\'s IP address.You will find your IP address in your new account e-mail. This needs to be replaced below where X.X.X.X is shown.
4. Save your changes and then restart any currently open browsers5. Once restarted you can then simply navigate to www.example.com this will then load from your new account with Smart Hosting ignoring your current DNS setup.
1. Either by start typing Terminal on the Spotlight, or by going into Applications -> Utilities -> Terminal.
2. Open the hosts by typing on the Terminal that you have just opened:
$ sudo nano
Type your user password when prompted.
3. The hosts file contains some comments (lines starting with the # symbol), as well as some default hostname mappings (e.g. 127.0.0.1 – localhost).
Simply append your new mappings underneath the default ones. Or edit one of the default values if you know what you are doing!
You can navigate the file using the arrow keys.
4. When done editing the hosts file, press control-o to save the file.
Press enter on the filename prompt, and control-x to exit the editor.
5. On Leopard, you can issue a simple Terminal command to flush the DNS cache, and have your host file changes to take immediate effect:
Powered by WHMCompleteSolution