Admin-Ahead Community

Linux => Control Panels => cPanel => Topic started by: vyshakhv on August 05, 2017, 04:59:47 pm

Title: How To Preview your Website On cPanel without DNS.
Post by: vyshakhv on August 05, 2017, 04:59:47 pm
If you have Windows on your PC

Open your hosts file with Administrator permissions, to do this right click on the NotePad icon, select 'Run as Administrator'
Now, in NotePad open the file:

c:\windows\system32\drivers\etc\hosts

If you have Linux

Open the file /etc/hosts
You will probably need to use sudo to gain root privileges to edit the file
Open a terminal and run

Code: [Select]
sudo nano /etc/hosts
So now you've opened your hosts file, add the following line:

168.144.146.13 www.yourdomain.com yourdomain.com

Replace 168.144.146.13 with the IP address of your site, you can find this in the left-hand column of cPanel. Replace "yourdomain.com" with your actual domain name.

Once you have made the change, save the file.

Then you could access the website from the same system.