PDA

View Full Version : Problem openning an IP with my IE


ConfusedOfLife
03-26-2003, 11:02 PM
Hi
Well, I have the IP of a site and I try to open it, I put it in my IE6, but it doesn't open anything and says Page Not Found. I remember that it used to work, but now it only accepts URLs ( or maybe it never worked! But I remember that I did it once, browsing a site by its IP). So, do I need any special program to accept my IP?

Mhtml
03-27-2003, 10:49 AM
Some sites can't be looked up via IP.

Try http://24.226.62.28 .. There is no domain for that so it should work.

ConfusedOfLife
03-27-2003, 12:13 PM
Yes, it works. But lemme be honest with you, now that I saw this IP, I'm feeling that I don't know anything about domains and Ips! Why doesn't it have any domain name? Can I also have an IP without a domain name? Then what does a DNS do? How can I set up my site without having a domain name?! You know, I wrote a script in PHP that when you give it the site name ( domain ) it gives you the IP address. So, the whole story just began when I wanted to test if the IP address is right, and to my limited knowledge, I thought if I put it in my browser it should work, but it doesn't. You can also see the script in here:

www.sajharsanat.com/test/showIP.php

But if it's any special tutorial about these basic things that you can guide me to, I'll be happy to read it. Sometimes I feel that I even do not know the basics!

Cheers,
bijan

Mhtml
03-27-2003, 12:32 PM
The Ip I gave you doesn't have a domain because there is no dns on the server. There are free dns things but they are hosted on other servers.

A domain works off a dns number which will lookup the ip of the server and get the site when you type in the domain name. Thus typing in an ip may bounce you off because the server is only setup to take the domain.

You can have a site running off an ip, for instace my computer website http://203.76.58.76 running off my personal webserver on my pc can be accessed via a ip as demonstrated. (When I log of the net it won't work, and dial up connections assign dynamic ip addresses)

If my IP wasn't dynamic I could download a DNS and register a domain pointing at it.

oracleguy
03-27-2003, 03:54 PM
What the DNS (Domain Name Service) does is it takes a domain name that a user enters in such as www.codingforums.com and it looks it up on the Internet's DNS servers maintained by InterNic and it translates it into an IP address. Then the browser contacts the server at the returned IP address and loads the page.

The point to using domains as you can surmize is that it is easier to remember www.codingforums.com than say 216.3.182.74

One possible explanation for why you can use a direct IP to contact the webserver is that perhaps its due to their firewall. You say you were able to get to it before, then perhaps they changed their firewall settings.

Or they could have gotten a new IP address. Thats another bonus of using domains, if you change servers and usually IP addresses, it doesn't affect your users because your address to them hasn't changed.

ConfusedOfLife
03-28-2003, 07:01 AM
Thanks! Now I can understand. So, you're saying if I had a static IP then I wouldn't need a domain ( not to mention how much easier using a domain would be ). But now that we don't have static IPs, and the IP changes all the time we log in to the Internet, we should use a DNS to redirect users to us. So, I can conclude that dear Mhtml has a static IP that he's running his site in his own PC, right?

Roy Sinclair
03-28-2003, 02:29 PM
The problem he's seeing may be simpler, DNS allows multiple domains to point to the exact same IP address. The Web Server software will then look at the domain name specified in the url and route the user's request to different web roots based on the name. The site he's visiting may have done this since he last visited using just an IP.

raf
03-28-2003, 03:05 PM
Mr. Sinclair is right. Beïng able to have more then 1 domain on a server is the big advantage over IP'numbers, but in the end, it comes down to: it's easier to remember + it's sort a independent from the machine that hosts your site.

A webservers has 1 IP number, but there can be more then 1 site running on it. Each site can have his owm domain.
Imagen this serverfolders
234.34.34.45/sites/site1/index.html
234.34.34.45/sites/site2/index.html

now, you could brose to both of them, using the IP and rest of the adress, but its much easier to type in site1.com or site2.com

On my machine, i've also got a webserver. If i logon, i could host my own sites, but as soon as i reboot/logoff, my provider gives me a different IP-number. So there's no way i can permanently host a site.
So there's no point in getting a domain. This just points to the IP. But that IP will be asigned to another user when he connects through my provider. You see?

If i'd like to host a site, i need to take a "business-account" with my provider, and then i'll get a fixed IP. I can then host sites and just give people the IP or i could buy a domainname and link it to my IP.
Without that, i need a host and then i can have my domain point to that host. If i switch host, i still have my domain, and just need to link it to my new host.

(IP numbers can come inhandy if routers are down or under attack)

ConfusedOfLife
03-28-2003, 07:02 PM
Thank you all for helping me. So, let's see if I got it! You say that it might be one main IP address and lots of site using it. When you enter a.com or b.com they might have a unique IP address, but then it would be the duty of the webserver to find out which page should be loaded based on the name we entered. So, it's exactly like query strings that we send to server side scripts, right? And I'm having this problem because my server expects me to specify which site I'm exactly looking for, because the IP actually belonges to several sites, but I am not specifying it.

Ok, now I have a new question. You brought this example:

234.34.34.45/sites/site1/index.html
234.34.34.45/sites/site2/index.html


What happens if 2 different IPs in the world have site1.com as their children? I mean I only enter [b]www.site1.com[b] in my browser, so, how do they understand that I wana go to 234.34.34.45 or maybe 55.37.34.45? ( Just an example, I don't know if it exists at all! )

missing-score
04-06-2003, 12:47 PM
They dont.

If you have ever registered a domain then you will know that you cannot host 2 IP's off one domain.

Correct me if I am wrong.

raf
04-06-2003, 02:16 PM
If you register a domain, like www.site1.com, then the registration firm will chack if that domain already exists. So it's not possible to register two domains with the same name.

When you register, you link the domain to an nameserver.

Morgoth
04-07-2003, 02:30 AM
Infact, the site http://24.226.62.28 has a domain name. But since I set no specific host header that my web server reads, anything that points to 24.226.62.28 will go to the default page.

Later on, I will turn off the ability to view my site threw just the IP, by making a host header for:
IP:24.226.62.28 Port:80 Name:Domain.com
IP:24.226.62.28 Port:80 Name:www.Domain.com
And not:
IP:24.226.62.28 Port:80 Name:

Which means anything else will be denied and you will see a page that displays:

<html><head><title>Site Not Found</title></head>
<body>No web site is configured at this address.</body></html>


This doesn't explain why you see the 404 page not found, else it has something to do with custom errors...

<edit>
By the way, the information given by your script is all true for my domain.
</edit>

ConfusedOfLife
04-07-2003, 07:57 PM
Thank you all. I knew that domain names are unique, but after raf gave me that example, I didn't understand that www.site1.com is a domain in this case and it's not just a custom directory in a server. Well, now I know that a company who dedicates domains, has one IP and for making each domain ( directory somehow in my mind! ) it has to check if other IPs do not have it.

Morgoth
04-07-2003, 11:33 PM
Well, this is where name servers come in

You have a Domain host (the place that you buy your domain from, and have it hosted), and the DNS server (the server that reconizes the domain and send it to an IP)

My Domain host, hosts only my domain name, not my IP.
My DNS host, has a nameserver which I tell my Domain host about. Then, when I click my http://www.domain.com, it send me to the nameserver address.

When the nameserver gets connected to you, it checks the domain name you used, and checks to see if it's registered on the server. If it is, it sends you the IP, and you now view the site that is at the IP address.

3 things:
Domain name (host of domain name, and where to have the nameserver address)
Dns Host (the place with the nameservers are hosted.)
IP address (website computer)

It's not hard when you do it hands on...