Preview Url http://ip/~username - Not supported error


http://server_ip/~username will not work on all protected Servers. 

How to preview website.

There is a work around to get the website preview for all servers.  You need to edit the hosts file in your computer to point your domainname to your hosting server ip.

filename to edit : hosts

Windows OS :
Hosts file location : c:\Windows\System32\Drivers\etc\
By default write permission is disabled in windows OS. you need to change the permission and give modify rights to the user. 

Linux OS :
Hosts file location : /etc/
use "nano /etc/hosts" or "vi /etc/hosts"

MAC OS :
Hosts file location : /etc/
use "sudo vim /etc/hosts"


Then edit the hosts file in any text editor and add the below.  Replace yourdomainname with your original domain name
server_ip yourdomainname
server_ip www.yourdomainname
Then save the file. 

Now from this computer if you type the url http://yourdomainname, this will work to get the website hosted in the mentioned server ip.  Please note that this will work only on the computer where you modified the hosts file.  Once you are finished, you can delete the above entries from hosts file and afterwards the domain points to the server_ip as configured in your domain's nameservers.

  • linux, php, error
  • 0 Users Found This Useful
Was this answer helpful?