How to access my website on GoDaddy with just the IP address of my Web Hosting account

Kuldeep Kumar picture Kuldeep Kumar · Aug 15, 2016 · Viewed 13.1k times · Source

First of all I am complete beginner in web hosting. This is my first time so please correct me if I am wrong.

What I want to do: I have made an index.php file. I am sure I have written the php code correctly. I want this file to be hosted by a web host. I don't want to purchase a domain name for this. I want to access this file over internet via only the IP address of website.

What I did: I purchased a web host account on GoDaddy. I didn't purchase any domain names for my web hosting. I uploaded the index.php file to the public_html folder. Now I am trying to access my index.php file using only the IP address of my website. Let's say my website's IP address is 166.XX.XX.XXX. Here are the screenshots for my website's IP address and File explorer window:

Website IP Address

File Explorer - index.php

What's the problem: I tried visiting http://166.XX.XX.XXX/public_html/www/index.php on my browser but I am not able to access index.php using the IP address. Its showing me 404 page not found error. If I try to visit http://166.XX.XX.XXX/ its showing a Coming Soon page instead of my index.php page.

Is it possible to access my index.php file with just the IP address or do I have to buy domain name first.

Answer

BeetleJuice picture BeetleJuice · Aug 15, 2016

I purchased a web host account on GoDaddy. I didn't purchase any domain names

Three possibilities come to mind right away:

  1. If you have shared hosting, this will make your site inaccessible by direct IP. In a shared hosting environment, the host (GoDaddy) will have multiple websites living at the same IP address. When a browser requests a website, the server relies on the domain name to determine which of the many websites to serve. Without a domain name, the server has no way to tell what the browser actually wants so you don't get your website. To avoid this situation, you will need a host to give you exclusive use of an IP address.

  2. Very similar to 1. The IP address you have is not the actual address of the server that has your site, but the address of a proxy server that performs optimization duties such as caching content or filtering bad requests. One such proxy service is Cloudflare. In this instance the effect is the same as in step 1: without a domain name, the proxy server has no way to know which of the websites it should proxy for and return to the browser.

  3. Assuming you have exclusive use of your IP address and that the address is to the server that actually hosts the site, a setting on the server may disallow IP based navigation. I would contact the web host to explore remedies to this possibility