How to view a website before you switch your DNS
How do I view my website without switching DNS, or how can I get a temporary domain name, is one of the more common questions we get asked. Customers who ask this, are either developing a new site or have migrated from another provider and want to test everything is working before they point their domain to our servers.
At Clook, there are two methods to test your site.
1 Setup a temporary domain.
This method is ideal for sites that need to be viewed by multiple people at different locations but does involve more configuration than editing your local host file. You will need to configure your app to use the temporary domain name and then when you are ready to put the site live, change the configuration to use the live domain.
On each user’s cPanel, there is a link to create a temporary domain. Simply click this and you will be issued a temporary domain, which you can then use to configure your app to display the site at the given URL.
Just allow 20-30 minutes for DNS propagation.
2 Edit your local host file.
Editing your local host file, is one of the quickest and easiest ways to view your site, without pointing the actual domain at the server. All that is required are two entries in your host file, the IP address and the domain that IP address should resolve to.
You can follow this guide here to edit your host file which differs slightly, depending upon whether you use Windows, Mac, or Linux https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/
This method has many benefits, the main one being that you do not have to edit your apps configuration – making this much quicker than putting in place a temporary domain. The only downside is that it will only work on one machine (or one site if you make the changes at router level).
Will’s our technical sales guy from the hills of Rossendale. In his spare time he can be found designing and building websites, or doing a spot of DIY!