If you are switching your hosting account or if you just brought a new hosting account and want to preview and setup your website on your hosting server without changing any domain settings. Then you can do this in very simple way. Previewing your website hosting without changing DNS setting has many advantages.
Advantage of previewing the hosting without changing DNS
Setup hosting without changing DNS on Windows
1) Firstly open your notepad using Administrator privilege, I mean press window key and type notepad. On the notepad icon right click and select "Run as administrator" option. See image below.
2) Now in the notepad press "CTRL + O" or go to open by clicking on file option. You have to open a file from the address "C:\Windows\System32\drivers\etc\hosts". So copy this address and paste it in the address bar of the explorer or navigate to the etc folder manually. Inside the etc folder you will find hosts file without any extension. There may be many hosts files with extension. Choose the hosts file without extension.
3) After opening the hosts file in the notepad, go to the end of the file and enter the details given below.
i) Firstly enter your SERVER IP, which you will get in the email and then your Domain name. Enter them with a space as shown in image below.
4) Now press "CTRL + S" to save the hosts file. And you are done. View your domain on your browser; you will see the hosting account is linked to your domain name temporarily on your PC only. Now go to your Cpanel and install any scripts like WordPress on your hosting account and preview it with your domain.
Remember all the things will happen on your PC only, no one else can see your website domain on the hosting account.
Here is a simple step by step video tutorial: https://youtu.be/FfBlMAP6BFg
Thank you for reading this post. Share it with your friends.