Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How To Preview your Website On cPanel without DNS.  (Read 2232 times)

0 Members and 1 Guest are viewing this topic.

vyshakhv

  • Newbie
  • *
  • Posts: 28
  • Karma: +0/-0
How To Preview your Website On cPanel without DNS.
« 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.
« Last Edit: August 05, 2017, 05:19:40 pm by vyshakhv »