Previewing Your Website On Web Hosting Before You Make It Live On Internet

SANGKRIT.net’s cPanel Hosting allows you to preview a website before actually making it visible to others requesting your domain name.

This can be done using your hosting account’s preview feature which is useful when you are setting up a new website for a domain that is currently active, either in your hosting account or somewhere else.

Start with login to your SANGKRIT.net account and then follow these steps:

  1. Visit My Account
  2. Click My Products
  3. Click Web Hosting
  4. Next to the cPanel account you want to use, click Manage.
  5. Click cPanel Admin.
  6. In the Domains section, click Preview Website.
  7. Next, to the domain, you want to use, click Preview.

Previewing Dynamic Websites

Given cPanel preview feature doesn’t work for highly dynamic websites. So if your website is built with WordPress, Drupal, etc, it generates content dynamically based on your domain name. The cPanel preview will not work properly in this regard.

Hence, to get a complete preview of your dynamic website, you should instead preview your website by editing your hosts file.

By adding entries to your hosts file you can view the files you have uploaded to your hosting account before really changing your domain’s nameservers.

For doing so, add your hosting account’s IP address as an entry on your computer’s host (your computer).

The location of the file depends on your operating system:

OS Host File Location
Windows (8, 7, XP, etc.) c:\windows\system32\drivers\etc\hosts
Macintosh OS X /private/etc/hosts
Linux /etc/hosts

You may need to make a copy of your hosts file to another location to make the changes then copy it back. Now, add an entry for your domain/hosting account using the following format:

[your account's IP address] [your fully qualified domain name]

For example:

12.0.0.1     example.com

You can also add the www version of your domain. You can add that version to the same line, like so:
12.0.0.1 coolexample.com www.example.com

After domain propagation, remove the entry from your hosts file because when you do not remove the entry and change plans or servers in the future, you will not be able to view your website.

Leave a Reply