Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access shared hosting website by ip address

I just start learn to create website. I create a free shared hosting (Hostinger) and uploaded my website . I can access my site by domain name but i dont known how to do it with the ip address they gave me.

> -My Domain name: mywebsitename.esy.es
> -IP: 31.170.167.204
> -Username: u935348985
> -SERVER IP: 31.170.167.195

Here is the question again: How can i access my web by the ip they gave me, not by domain name? THANK.

like image 751
dante Avatar asked Apr 26 '17 06:04

dante


2 Answers

If you're using shared hosting, making a HTTP request to the IP alone is not enough, as the server does not know which site you're looking for. Alongside the request, you must include the Host header, with your domain included.

By default, a browser will do this from the URL you provide it - so it will obviously be empty if accessing by an IP address. Depending on your browser, you can use various extensions to manually set the headers as required.

like image 60
Gareth Pulham Avatar answered Oct 25 '22 23:10

Gareth Pulham


There is a way to access your website with a testing URL. Use the below site and enter your server and domain details there.

https://hosts.cx/

This will create a temporary URL.

like image 33
Balasubramanian S Avatar answered Oct 26 '22 01:10

Balasubramanian S