How to access shared hosting website by ip address
Asked Answered
G

4

6

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.

Gubernatorial answered 26/4, 2017 at 6:11 Comment(1)
Maybe this will help you: #22044102Statistician
E
8

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.

Elbrus answered 26/4, 2017 at 6:17 Comment(0)
S
4

Generally you can access in shared hosting website using IP or DNS address by you have to add ~ sign before your username in below format

http://<server_ip_or_dns>/~<your_username>,

If its not working then you have to contact your web administrator.

Sturgeon answered 26/4, 2017 at 6:17 Comment(3)
Which one? 31.170.167.195/~u935348985 or 31.170.167.204/~u935348985 or 31.170.167.195/~mywebsitename ? Ijust check, None of it work.Gubernatorial
@dante, then contact your web administrator. :) because all web hosting provides this facility for access without domain by using ip address and usernameSturgeon
@HareshVidja This seems to work for me and I can access my shared hosting space. Is this the IP address I use for setting A records e.g. 143.95.38.226/~ariescom ?Compel
L
4

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.

Lambkin answered 9/5, 2020 at 15:39 Comment(0)
R
1

As mentioned by @Gareth, you can use a software like PostMan to simulate a request to your host. Just use a GET request with your server's IP address, then:

  • Click on Headers
  • Uncheck Host header
  • Add a new Host header and specify your domain name as value
  • Then Send your request
Radioscopy answered 29/10, 2020 at 21:46 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.